pombreda / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

test_suite="nose.collector" broken under Python 2.7rc1's unittest #340

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Place the following setup.py file in a directory, along with a Python 
file with some nose tests in it:

from setuptools import setup

setup(name='testdist',
      version='0.1',
      test_suite='nose.collector',
      tests_require=['nose'])

2. Run "python setup.py test"

What is the expected output? What do you see instead?

In Python 2.4-2.6 (at least), the nose tests are run. In Python 2.7rc1, 
this:

(py27env)carljm@kale:~/projects/nose/collector27$ python setup.py test
running test
running egg_info
writing testdist.egg-info/PKG-INFO
writing top-level names to testdist.egg-info/top_level.txt
writing dependency_links to testdist.egg-info/dependency_links.txt
reading manifest file 'testdist.egg-info/SOURCES.txt'
writing manifest file 'testdist.egg-info/SOURCES.txt'
running build_ext
Traceback (most recent call last):
  File "setup.py", line 6, in <module>
    tests_require=['nose'])
  File "/opt/python-2.7rc1/lib/python2.7/distutils/core.py", line 152, in 
setup
    dist.run_commands()
  File "/opt/python-2.7rc1/lib/python2.7/distutils/dist.py", line 953, in 
run_commands
    self.run_command(cmd)
  File "/opt/python-2.7rc1/lib/python2.7/distutils/dist.py", line 972, in 
run_command
    cmd_obj.run()
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line 121, 
in run
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line 101, 
in with_project_on_sys_path
  File "build/bdist.linux-i686/egg/setuptools/command/test.py", line 130, 
in run_tests
  File "/opt/python-2.7rc1/lib/python2.7/unittest/main.py", line 95, in 
__init__
    self.runTests()
  File "/opt/python-2.7rc1/lib/python2.7/unittest/main.py", line 229, in 
runTests
    self.result = testRunner.run(self.test)
  File "/opt/python-2.7rc1/lib/python2.7/unittest/runner.py", line 151, in 
run
    test(result)
  File "/opt/python-2.7rc1/lib/python2.7/unittest/suite.py", line 65, in 
__call__
    return self.run(*args, **kwds)
  File "/opt/python-2.7rc1/lib/python2.7/unittest/suite.py", line 85, in 
run
    self._wrapped_run(result)
  File "/opt/python-2.7rc1/lib/python2.7/unittest/suite.py", line 97, in 
_wrapped_run
    if _isnotsuite(test):
  File "/opt/python-2.7rc1/lib/python2.7/unittest/suite.py", line 261, in 
_isnotsuite
    iter(test)
  File "/opt/python-2.7rc1/lib/python2.7/unittest/suite.py", line 33, in 
__iter__
    return iter(self._tests)
AttributeError: 'FinalizingSuiteWrapper' object has no attribute '_tests'

What version of the product are you using? On what operating system?

Tested with nose==dev, on Python 2.7rc1, Ubuntu 9.10.

Please provide any additional information below.

Looks like some internal unittest APIs changed in 2.7, and nose needs to be 
updated to match.

Original issue reported on code.google.com by carl.j.meyer on 6 Jun 2010 at 3:32

GoogleCodeExporter commented 9 years ago

Original comment by jpelle...@gmail.com on 7 Jun 2010 at 2:27

GoogleCodeExporter commented 9 years ago

Original comment by jpelle...@gmail.com on 7 Jul 2010 at 4:23