4π
I get this error when I donβt properly point to the test Iβm trying to run.
When I tried to run a specific test method I tried the following and got the error you mention: ./manage.py test myapp.tests.test_file.MyTestCase.test_something
What I had to run to actually get it to work was: ./manage.py test myapp.tests.test_file:MyTestCase.test_something
(Notice the :
between the file name and the class name)
I believe this issue is specific to βnoseβ.
0π
To fix this in Pycharm, you need to specify your test runner with TEST_RUNNER = "django_nose.NoseTestSuiteRunner"
(or whatever your runner) in the settings.py
you set up in Preferences > Languages & Frameworks > Django
and NOT the one set up in your test/run config.
See comments on the following: