I suspect I failed to install nosetests correctly.
I used easy_install nose – output was
Searching for nose
Best match: nose 1.0.0
Processing nose-1.0.0-py2.7.egg
nose 1.0.0 is already the active version in easy-install.pth
Installing nosetests-script.py script to C:\Python27\Scripts
Installing nosetests.exe script to C:\Python27\Scripts
Installing nosetests-2.7-script.py script to C:\Python27\Script
Installing nosetests-2.7.exe script to C:\Python27\Scripts
So it looks like it installs fine. But when I run nosetests -h
PS C:\Users\john\code\python> nosetests -h
Traceback (most recent call last):
File "C:\Python27\Scripts\nosetests-script.py", line 9, in <module>
load_entry_point('nose==1.0.0', 'console_scripts', 'nosetests')()
File "C:\Python27\lib\site-packages\nose-1.0.0-py2.7.egg\nose\core.py", line 118, in __init__
**extra_args)
TypeError: __init__() got an unexpected keyword argument 'exit'
Did I miss a setup step somehow?
Weird. In
nose/core.pytheTestProgramconstructor calls the parent constructor like this:Constructor of
TestPrograminunittest/main.pyaccepts theexitargument:So… I don’t know how this error could happen. Do you have more versions of Python installed? Is your nosetests really using the correct
unittestmodule for Python 2.7? Can you look atunittest\main.py(somewhere in yourC:\Python27) and check theTestProgramconstructor, whether it has anexitargument?