How to run a single test or single TestCase with django-nose?

GDorn picture GDorn · Sep 16, 2013 · Viewed 16.1k times · Source

With Django's normal test runner, you can drill down to run tests in a specific app, a specific subclass of TestCase, or a specific test within a specific subclass of TestCase.

E.g.:

./manage.py test myapp.MyTestCase.test_something

However, django-nose doesn't appear to support anything beyond testing a specific app. How do I replicate the last two behaviors?

Answer

alecxe picture alecxe · Sep 16, 2013

Nose supports the following syntax (note : between test script name and test class name):

./manage.py test myapp.tests.test_script:MyTestCase.test_method