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

后端 未结 2 1161
长发绾君心
长发绾君心 2020-12-17 07:48

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 TestC

相关标签:
2条回答
  • 2020-12-17 08:27

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

    ./manage.py test myapp.tests.test_script:MyTestCase.test_method
    
    0 讨论(0)
  • 2020-12-17 08:35

    The correct answer is ./manage.py test myapp/tests/test_script:MyTestCase.test_method.

    Using dots in the relative path did not work for me, but slashes did.

    0 讨论(0)
提交回复
热议问题