nose-devs / nose

nose is nicer testing for python
http://readthedocs.org/docs/nose/en/latest/
1.36k stars 395 forks source link

ImportError: cannot import name _TextTestResult #363

Closed jpellerin closed 12 years ago

jpellerin commented 12 years ago

python2.7 setup.py install Traceback (most recent call last): File "setup.py", line 1, in from nose import version as VERSION File "/Users/eikeon/nose-0.11.0/nose/init.py", line 1, in from nose.core import collector, main, run, run_exit, runmodule File "/Users/eikeon/nose-0.11.0/nose/core.py", line 15, in from nose.result import TextTestResult File "/Users/eikeon/nose-0.11.0/nose/result.py", line 12, in from unittest import _TextTestResult ImportError: cannot import name _TextTestResult

Google Code Info: Issue #: 318 Author: eik...@gmail.com Created On: 2010-02-06T15:50:35.000Z Closed On: 2010-02-08T00:16:54.000Z

jpellerin commented 12 years ago

Looks like _TextTestResult is not in unittest.runner instead of unittest. Up and running with that one small change.

Google Code Info: Author: eik...@gmail.com Created On: 2010-02-06T16:16:07.000Z

jpellerin commented 12 years ago

This is fixed in stable (the hg repo here on google code).

Google Code Info: Author: jpelle...@gmail.com Created On: 2010-02-08T00:16:54.000Z

jpellerin commented 12 years ago

I just pulled down from the hg repo and this looks like it's still an issue with Python2.7. The attached patch makes it work on Python2.7 (although probably breaks it for other versions as it looks like _TextTestResult has moved modules).

Google Code Info: Author: eik...@gmail.com Created On: 2010-02-19T17:12:21.000Z

jpellerin commented 12 years ago

My mistake -- this is actually fixed in unstable: http://bitbucket.org/jpellerin/nose. Those changes will be pulled into stable soon.

Google Code Info: Author: jpelle...@gmail.com Created On: 2010-02-19T17:27:36.000Z

jpellerin commented 12 years ago

Sounds good, just wanted to make sure it's in the pipe if it wasn't already.

Google Code Info: Author: eik...@gmail.com Created On: 2010-02-19T17:54:42.000Z