Hi all.
We have problems running tests in pylons, we did everything like it
described at http://wiki.pylonshq.com/display/pylonsdocs/Unit+Testing
When I run /sw/bin/python2.5 setup.py nosetests
I get following trace
mykola-paliyenkos-macbook-pro-3:uaprom mykola$ /sw/bin/python2.5
setup.py nosetests
running nosetests
running egg_info
writing requirements to uaprom.egg-info/requires.txt
writing uaprom.egg-info/PKG-INFO
writing top-level names to uaprom.egg-info/top_level.txt
writing dependency_links to uaprom.egg-info/dependency_links.txt
writing entry points to uaprom.egg-info/entry_points.txt
reading manifest template 'MANIFEST.in'
writing manifest file 'uaprom.egg-info/SOURCES.txt'
running build_ext
ERROR
======================================================================
ERROR: test suite for <module 'uaprom.tests' from '/opt/workspace/
uaprom/uaprom/tests/__init__.pyc'>
----------------------------------------------------------------------
Traceback (most recent call last):
File "/sw/lib/python2.5/site-packages/nose-0.10.1-py2.5.egg/nose/
suite.py", line 148, in run
self.setUp()
File "/sw/lib/python2.5/site-packages/nose-0.10.1-py2.5.egg/nose/
suite.py", line 196, in setUp
self.setupContext(ancestor)
File "/sw/lib/python2.5/site-packages/nose-0.10.1-py2.5.egg/nose/
suite.py", line 219, in setupContext
try_run(context, names)
File "/sw/lib/python2.5/site-packages/nose-0.10.1-py2.5.egg/nose/
util.py", line 393, in try_run
(name, obj))
TypeError: Attribute setup of <module 'uaprom' from '/opt/workspace/
uaprom/uaprom/__init__.pyc'> is not a python function. Only functions
or callables may be used as fixtures.
-------------------- >> begin captured stdout << ---------------------
Running setup_config() from uaprom.websetup
loading environment
Creating tables
Insert data
done populating data...
--------------------- >> end captured stdout << ----------------------
----------------------------------------------------------------------
Ran 0 tests in 0.279s
FAILED (errors=1)
My test.ini file is
#
# uaprom - Pylons testing environment configuration
#
# The %(here)s variable will be replaced with the parent directory of
this file
#
[DEFAULT]
debug = true
# Uncomment and replace with the address which should receive any
error reports
#email_to = [EMAIL PROTECTED]
smtp_server = localhost
error_email_from = [EMAIL PROTECTED]
[server:main]
use = egg:Paste#http
host = 0.0.0.0
port = 5000
[app:main]
use = config:development.ini
# Add additional test specific configuration options as necessary.
My setup.cfg has following section
[nosetests]
verbose=True
verbosity=2
with-pylons=test.ini
detailed-errors=1
with-doctest=True
Why it searches for fixtures in uaprom/uaprom/__init__.pyc?
Thanks in advance for any help!
m
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---