[Python-modules-team] Bug#586088: nosetests fails on freshly quickstarted app
Enrico Zini
enrico at debian.org
Wed Jun 16 10:00:44 UTC 2010
Package: python-turbogears2
Version: 2.0.3-2
Severity: normal
Hello,
thanks for maintaning TurboGears 2.
If I quickstart an app and run nosetests, it fails:
$ paster quickstart
Enter project name: antani
Enter package name [antani]:
Do you need authentication and authorization in this project? [yes]
Selected and implied templates:
tg.devtools#turbogears2 TurboGears 2.0 Standard Quickstart Template
Variables:
auth: sqlalchemy
egg: antani
geo: None
package: antani
project: antani
sqlalchemy: True
sqlobject: False
tgversion: 2.0.3
[...]
Copying test.ini_tmpl to ./antani/test.ini
Running /usr/bin/python setup.py egg_info
running egg_info
writing requirements to antani.egg-info/requires.txt
writing antani.egg-info/PKG-INFO
writing top-level names to antani.egg-info/top_level.txt
writing dependency_links to antani.egg-info/dependency_links.txt
writing entry points to antani.egg-info/entry_points.txt
writing paster_plugins to antani.egg-info/paster_plugins.txt
reading manifest file 'antani.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'antani.egg-info/SOURCES.txt'
$ ls -la
total 88
drwxr-xr-x 3 enrico enrico 4096 Jun 16 11:56 .
drwxrwxrwt 14 root root 77824 Jun 16 11:56 ..
drwxr-xr-x 5 enrico enrico 4096 Jun 16 11:56 antani
$ nosetests
EE
======================================================================
ERROR: Failure: ImportError (No module named model.auth)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.5/nose/loader.py", line 379, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/pymodules/python2.5/nose/importer.py", line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/pymodules/python2.5/nose/importer.py", line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/tmp/zz/antani/antani/model/__init__.py", line 62, in <module>
from antani.model.auth import User, Group, Permission
ImportError: No module named model.auth
======================================================================
ERROR: Failure: ImportError (cannot import name model)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.5/nose/loader.py", line 379, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/pymodules/python2.5/nose/importer.py", line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/pymodules/python2.5/nose/importer.py", line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/tmp/zz/antani/antani/tests/__init__.py", line 14, in <module>
from antani import model
ImportError: cannot import name model
----------------------------------------------------------------------
Ran 2 tests in 0.206s
FAILED (errors=2)
$ cd antani
$ nosetests
E
======================================================================
ERROR: Failure: ImportError (cannot import name model)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.5/nose/loader.py", line 379, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/pymodules/python2.5/nose/importer.py", line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/pymodules/python2.5/nose/importer.py", line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/tmp/zz/antani/antani/tests/__init__.py", line 14, in <module>
from antani import model
ImportError: cannot import name model
-------------------- >> begin captured logging << --------------------
pylons.configuration: DEBUG: Initializing configuration, package: 'antani'
pylons.configuration: DEBUG: Loaded None template engine as the default template renderer
routes.middleware: DEBUG: Initialized with method overriding = True, and path info altering = True
--------------------- >> end captured logging << ---------------------
----------------------------------------------------------------------
Ran 1 test in 0.002s
FAILED (errors=1)
Now with all the layers of magic and abstraction that TurboGears2 and
Nose like to deploy, it might take me quite some time to find out how to
actually get the test suite to run.
Ciao,
Enrico
-- System Information:
Debian Release: squeeze/sid
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.32-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages python-turbogears2 depends on:
ii python 2.5.4-9 An interactive high-level object-o
ii python-genshi 0.6-1 Python XML-based template engine
ii python-pylons 0.10-1 Python web framework emphasizing f
ii python-repoze.tm2 1.0a4-2 Zope-like transaction manager via
ii python-repoze.what-plugins 20090531-2 authorization framework for Python
ii python-support 1.0.8 automated rebuilding support for P
ii python-toscawidgets 0.9.7.2-1 Python framework for building reus
ii python-turbojson 1.2.1-4 Plugin to use JSON templates in Py
ii python-weberror 0.10.2-1 Python web error handling and exce
ii python-webflash 0.1a9-3 Portable flash messages for Python
Versions of packages python-turbogears2 recommends:
ii python-pysqlite2 2.6.0-1 Python interface to SQLite 3
ii python-tg.devtools 2.0.2-1 developer tools for the TurboGears
Versions of packages python-turbogears2 suggests:
ii python-elixir 0.7.1-1 Declarative Mapper for SQLAlchemy
-- no debconf information
More information about the Python-modules-team
mailing list