Upgraded from python 3.7 to 3.8 today. Unittest discovery in nose no longer works.
Simplified project layout
x:\proj\src\__init__.py
x:\proj\src\first.py
x:\proj\tests\__init.py
x:\proj\tests\testfirst.py
From project root x:\proj
, run:
nosetests -v
-----------------------------------------------
Ran 0 tests in 0.016s
OK
Can only run unittests by specifying them, eg:
nosetests tests.testfirst
.
----------------------------------------------------------------------
Ran 1 test in 0.000s
OK
Platform
Nose now requires you use the --traverse-namespace
option when there are multiple packages. You can add this to the nosetests
invocation, or to save yourself typing, add it to setup.cfg
, eg:
[nosetests]
traverse-namespace=1
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