nose-devs/nose — Issue #250: Nose can't find tests in zipped eggs
Author: jpellerin
Created: 2011-12-14 16:05:21+00:00
State: open

What steps will reproduce the problem?
1. Install a package as a zipped egg: simplejson is a good example
2. Try to have nose find and run the tests for the package: nosetests simplejson

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

nose should find the tests and run them. Instead you see something like:

host$ nosetests -v simplejson
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 8, in
load_entry_point('nose==0.10.1', 'console_scripts', 'nosetests')()
File "/Library/Python/2.5/site-packages/nose-0.10.1-py2.5.egg/nose/core.py", line 219, in
__init__
argv=argv, testRunner=testRunner, testLoader=testLoader)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/unittest.py",
line 767, in __init__
self.parseArgs(argv)
File "/Library/Python/2.5/site-packages/nose-0.10.1-py2.5.egg/nose/core.py", line 270, in
parseArgs
self.createTests()
File "/Library/Python/2.5/site-packages/nose-0.10.1-py2.5.egg/nose/core.py", line 284, in
createTests
self.test = self.testLoader.loadTestsFromNames(self.testNames)
File "/Library/Python/2.5/site-packages/nose-0.10.1-py2.5.egg/nose/loader.py", line 422, in
loadTestsFromNames
return unittest.TestLoader.loadTestsFromNames(self, names, module)
File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/unittest.py",
line 565, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/Library/Python/2.5/site-packages/nose-0.10.1-py2.5.egg/nose/loader.py", line 377, in
loadTestsFromName
module, discovered=discovered)
File "/Library/Python/2.5/site-packages/nose-0.10.1-py2.5.egg/nose/loader.py", line 296, in
loadTestsFromModule
tests.extend(self.loadTestsFromDir(path))
File "/Library/Python/2.5/site-packages/nose-0.10.1-py2.5.egg/nose/loader.py", line 128, in
loadTestsFromDir
entries = os.listdir(path)
OSError: [Errno 20] Not a directory: '/Library/Python/2.5/site-packages/simplejson-1.7.3-
py2.5-macosx-10.5-i386.egg/simplejson'

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

nose 0.10.1, OS X 10.5, built-in python

Please provide any additional information below.

Thanks!

Google Code Info:
Issue #: 150
Author: ellisonb...@gmail.com
Created On: 2008-01-17T22:05:42.000Z
Closed On: