I am switching from python's unittest framework to nosetests, trying to reuse my unittest.TestCase
s
After cd
ing into my tests package I started nosetests as described on their homepage:
./test/$ nosetests
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
Why do I need to specify each module to have nose discover its tests like in the following example?
./test/$ nosetests test_all.py
.......
----------------------------------------------------------------------
Ran 7 tests in 0.002s
OK
Also running the tests one folder above doesn't change anything.
./tests/$ cd ..
./$ nosetests
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
I can see in your repo that at least some of the files are executable, so that is at least part of the problem. By default, nose won't collect those: it's trying to avoid running scripts that might do something destructive on import. Try the --exe flag, or removing the executable bit from the test files.
You need to be in the directory above that if you want nose to run all the tests in that package.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With