Suppose you have a python package named A with the following directory structure
A
├── B.py
└── __init__.py
where is __init__.pyempty and the content B.pyis set
def test_B():
assert False
Running the nose over the simple package above skips the test
$ nosetests A
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Need to run
$ nosetests A/B.py
to catch the test, but quickly becomes cumbersome if there is a complex structure of the submodule.
How to make the nose run all the functions, starting with the “test” in package A without specifying each file in which they occur?
source
share