bitprophet/spec — Issue #14: Better error message when used w/o options and `tests` not found
Author: yanne
Created: 2011-11-11 05:56:35+00:00
State: open

In same working dir:

➜ nosetests

----------------------------------------------------------------------
Ran 0 tests in 0.001s

OK

➜ spec
Traceback (most recent call last):
File "/usr/bin/spec", line 9, in
load_entry_point('spec==0.9.3', 'console_scripts', 'spec')()
File "/usr/lib/python2.7/site-packages/spec/cli.py", line 111, in main
addplugins=plugins,
File "/usr/lib/python2.7/site-packages/nose/core.py", line 284, in run
return TestProgram(*arg, **kw).success
File "/usr/lib/python2.7/site-packages/nose/core.py", line 118, in __init__
**extra_args)
File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/usr/lib/python2.7/site-packages/nose/core.py", line 135, in parseArgs
self.config.configure(argv, doc=self.usage())
File "/usr/lib/python2.7/site-packages/nose/config.py", line 317, in configure
self.configureWhere(options.where)
File "/usr/lib/python2.7/site-packages/nose/config.py", line 400, in configureWhere
"not a directory" % path)
ValueError: Working directory tests not found, or not a directory

This seems a bit rude, especially to a newcomer. Perhaps just showing --help would be better?