How do I run a single test with Nose in Pylons
For me using Nosetests 1.3.0 these variants are working (but make sure you have __init__.py
in your tests folder):
nosetests [options] tests.ui_tests
nosetests [options] tests/ui_tests.py
nosetests [options] tests.ui_tests:TestUI.test_admin_page
Note that single colon between module name and class name.
nosetests appname.tests.functional.test_controller
should work, where the file is named test_controller.py
.
To run a specific test class and method use a path of the form module.path:ClassNameInFile.method_name
, that is, with a colon separating the module/file path and the objects within the file. module.path
is the relative path to the file (e.g. tests/my_tests.py:ClassNameInFile.method_name
).