nose-devs/nose — Issue #400: Test failures with Python 3
Author: jpellerin
Created: 2011-12-14 16:09:55+00:00
State: closed

Tests of Nose 1.0.0 fail with Python 3.1 and 3.2. I use Gentoo Linux.

$ python3.1 setup.py build
...
$ PYTHONPATH=build/lib python3.1 setup.py test
...
running egg_info
creating /tmp/nose-1.0.0/build/lib/nose.egg-info
writing /tmp/nose-1.0.0/build/lib/nose.egg-info/PKG-INFO
writing top-level names to /tmp/nose-1.0.0/build/lib/nose.egg-info/top_level.txt
writing dependency_links to /tmp/nose-1.0.0/build/lib/nose.egg-info/dependency_links.txt
writing entry points to /tmp/nose-1.0.0/build/lib/nose.egg-info/entry_points.txt
writing manifest file '/tmp/nose-1.0.0/build/lib/nose.egg-info/SOURCES.txt'
reading manifest file '/tmp/nose-1.0.0/build/lib/nose.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'doc/.build'
writing manifest file '/tmp/nose-1.0.0/build/lib/nose.egg-info/SOURCES.txt'
running build_py
running egg_info
writing /tmp/nose-1.0.0/build/lib/nose.egg-info/PKG-INFO
writing top-level names to /tmp/nose-1.0.0/build/lib/nose.egg-info/top_level.txt
writing dependency_links to /tmp/nose-1.0.0/build/lib/nose.egg-info/dependency_links.txt
writing entry points to /tmp/nose-1.0.0/build/lib/nose.egg-info/entry_points.txt
reading manifest file '/tmp/nose-1.0.0/build/lib/nose.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'doc/.build'
writing manifest file '/tmp/nose-1.0.0/build/lib/nose.egg-info/SOURCES.txt'
running build_ext
/tmp/nose-1.0.0/build/lib/nose/config.py:258: RuntimeWarning: Option 'doctest-extension' in config file 'setup.cfg' ignored: excluded by runtime environment
warn(msg, RuntimeWarning)
/tmp/nose-1.0.0/build/lib/nose/config.py:258: RuntimeWarning: Option 'doctest-fixtures' in config file 'setup.cfg' ignored: excluded by runtime environment
warn(msg, RuntimeWarning)
/tmp/nose-1.0.0/build/lib/nose/config.py:258: RuntimeWarning: Option 'with-doctest' in config file 'setup.cfg' ignored: excluded by runtime environment
warn(msg, RuntimeWarning)
test_empty_zero_nine_does_not_crash (test_zeronine.TestEmptyPlugin) ... ERROR
runTest (test_attribute_plugin.TestAttributeArray) ... ok
runTest (test_attribute_plugin.TestAttributeArrayAnd) ... ok
runTest (test_attribute_plugin.TestAttributeArrayOr) ... ok
runTest (test_attribute_plugin.TestAttributeEval) ... ok
runTest (test_attribute_plugin.TestAttributeValue) ... ok
runTest (test_attribute_plugin.TestNotSimpleAttribute) ... ok
runTest (test_attribute_plugin.TestSimpleAttribute) ... ok
test_run_buggy_generators (test_buggy_generators.TestBuggyGenerators) ... ok
Traceback (most recent call last):
File "/tmp/nose-1.0.0/build/lib/nose/loader.py", line 390, in loadTestsFromName
addr.filename, addr.module)
File "/tmp/nose-1.0.0/build/lib/nose/importer.py", line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/tmp/nose-1.0.0/build/lib/nose/importer.py", line 86, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/tmp/nose-1.0.0/build/tests/functional_tests/test_cases.py", line 3, in
from nose import case
ImportError: cannot import name case

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "setup.py", line 122, in
**addl_args
File "/tmp/nose-1.0.0/setup3lib.py", line 140, in setup
return _setup(*args, **kwargs)
File "/usr/lib64/python3.1/distutils/core.py", line 149, in setup
dist.run_commands()
File "/usr/lib64/python3.1/distutils/dist.py", line 919, in run_commands
self.run_command(cmd)
File "/usr/lib64/python3.1/distutils/dist.py", line 938, in run_command
cmd_obj.run()
File "/tmp/nose-1.0.0/setup3lib.py", line 133, in run
setuptools.command.test.test.run(self)
File "/usr/lib64/python3.1/site-packages/setuptools/command/test.py", line 137, in run
self.with_project_on_sys_path(self.run_tests)
File "/usr/lib64/python3.1/site-packages/setuptools/command/test.py", line 117, in with_project_on_sys_path
func()
File "/usr/lib64/python3.1/site-packages/setuptools/command/test.py", line 146, in run_tests
testLoader = loader_class()
File "/usr/lib64/python3.1/unittest.py", line 1566, in __init__
self.runTests()
File "/usr/lib64/python3.1/unittest.py", line 1611, in runTests
self.result = testRunner.run(self.test)
File "/usr/lib64/python3.1/unittest.py", line 1483, in run
test(result)
File "/usr/lib64/python3.1/unittest.py", line 1138, in __call__
return self.run(*args, **kwds)
File "/usr/lib64/python3.1/unittest.py", line 1134, in run
test(result)
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 581, in __call__
return self.run(*arg, **kw)
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 589, in run
return self.suite(*arg, **kw)
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 177, in __call__
return self.run(*arg, **kw)
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 224, in run
test(orig)
File "/usr/lib64/python3.1/unittest.py", line 1138, in __call__
return self.run(*args, **kwds)
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 75, in run
test(result)
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 177, in __call__
return self.run(*arg, **kw)
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 217, in run
for test in self._tests:
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 372, in _get_wrapped_tests
for test in self._get_tests():
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 99, in _get_tests
for test in self.test_generator:
File "/tmp/nose-1.0.0/build/lib/nose/loader.py", line 164, in loadTestsFromDir
entry_path, discovered=True)
File "/tmp/nose-1.0.0/build/lib/nose/loader.py", line 399, in loadTestsFromName
address=addr.totuple())])
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 427, in __call__
return self.makeSuite(tests, context, **kw)
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 482, in makeSuite
for ancestor in self.ancestry(context):
File "/tmp/nose-1.0.0/build/lib/nose/suite.py", line 453, in ancestry
yield resolve_name('.'.join(ancestors))
File "/tmp/nose-1.0.0/build/lib/nose/util.py", line 331, in resolve_name
obj = getattr(obj, part)
AttributeError: 'module' object has no attribute 'failure'

Google Code Info:
Issue #: 387
Author: Arfrever...@gmail.com
Created On: 2010-12-18T17:17:22.000Z
Closed On: 2011-02-08T15:51:16.000Z