lundi 12 septembre 2016

Running tests in single Python file with nose

I'm using nose 1.3.7 with Anaconda 4.1.1 (Python 3.5.2). I want to run unit tests in a single file, e.g. foo.py. According to the documentation I should be able to simply run:

nosetests foo.py

But when I do this, nose runs all the tests in all the files in the directory!

And if I do nose --help, the usage documentation doesn't even indicate that there is a parameter. It only shows [options].

So can I run tests in a single file using nose?

Aucun commentaire:

Enregistrer un commentaire