Fix setup.py commands
BigBlueHat opened this issue Β· comments
python setup.py test
uses a different system than the nosetests
stuff we've setup. We should probably also document all the options...maybe. π
Hmm... maybe we should mention that run python setup.py nosetests
instead.
The python setup.py test
can not run with some nose plugins we need, e,g,: coverage plugin.
FYI: http://nose.readthedocs.org/en/latest/setuptools_integration.html
Good find. I made the change suggested in those docs locally, and tried them both on my Mac and here's the error I got.
$ python setup test
$ # or...both return the same error...
$ python setup.py nosetests
running nosetests
running egg_info
writing requirements to Couchapp.egg-info/requires.txt
writing Couchapp.egg-info/PKG-INFO
writing top-level names to Couchapp.egg-info/top_level.txt
writing dependency_links to Couchapp.egg-info/dependency_links.txt
writing pbr to Couchapp.egg-info/pbr.json
reading manifest file 'Couchapp.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching '*' under directory 'doc'
writing manifest file 'Couchapp.egg-info/SOURCES.txt'
E
======================================================================
ERROR: Failure: ImportError (No module named errors)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/nose/loader.py", line 414, in loadTestsFromName
addr.filename, addr.module)
File "/usr/local/lib/python2.7/site-packages/nose/importer.py", line 47, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/local/lib/python2.7/site-packages/nose/importer.py", line 94, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
File "/Users/byoung/dev/apps/couchapp/tests/__init__.py", line 1, in <module>
import test_cli
File "/Users/byoung/dev/apps/couchapp/tests/test_cli.py", line 16, in <module>
from couchapp.errors import ResourceNotFound
ImportError: No module named errors
----------------------------------------------------------------------
Ran 1 test in 0.014s
FAILED (errors=1)
I'm also not sure how we'd hook in the .ini file. Certainly (you'd think...) it could/should/would be possible, but obviously it's not quite as straightforward as I'd hoped. π¦
That link does point us in the right direction, though! π
I also got the weird import error π¨
Researching on it ... seems someone encounter the same problem ... ref
You rock, @iblis17...as ever! πΈ
π