Behold, my setup.py:
https://github.com/mongodb/motor/blob/master/setup.py
... and setup.cfg:
https://github.com/mongodb/motor/blob/master/setup.cfg
I'd like to be able to run one suite, like:
python setup.py nosetests test.test_motor_ssl
But I get "invalid command name 'test.test_motor_ssl'". With this, on the other hand:
python setup.py nosetests --tests test.test_motor_ssl
... nosetests runs every test in my project. How can I tell nosetests, when it is running in setup.py, how to run a subset of tests?
If you really want isolation instead just doing python setup.py install in virtualenv. Then use virtualbox and install some free linux os in it. Take a snapshot of the machine after the install so you can revert easily with one click to the starting point at any time and try python setup.py install there.
nose can be integrated with DocTest by using with-doctest option in athe bove command line. The result will be true if the test run is successful, or false if it fails or raises an uncaught exception. nose supports fixtures (setup and teardown methods) at the package, module, class, and test level.
Apparently this is a known bug in nose 1.2.1 and they already have a fix in the master branch. You can either wait for the next version or use the nosetests
command directly.
source: https://github.com/nose-devs/nose/issues/556
The only thing that works now is actually the directory approach. It is still not possible to specify the path...
python setup.py nosetests -w tests/test_folder
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