python - How do I specify a single test in a file with nosetests? -
i have file called test_web.py containing class testweb , many methods named test_something().
i can run every test in class so:
$ nosetests test_web.py ... ====================================================================== fail: checkout test ---------------------------------------------------------------------- traceback (most recent call last): file "/users/me/path/here/test_web.py", line 187, in test_checkout ...
but can’t seem run individual tests. these give me “no such test” errors when run in same pwd:
$ nosetests test_web.py:test_checkout $ nosetests testweb:test_checkout
what wrong here?
you must specify so: nosetests <file>:<test_case>.<test_method>
, or
nosetests test_web.py:testweb.test_checkout
see the docs
Comments
Post a Comment