Bug: "No tests were found"
After upgrading pycharm to the latest version my "django tests" stopped working.
If I put a correct value in the target field, e.g. "app.tests.SomeTestClass" - then it runs the tests from that class.
When I want to run all tests and leave the target blank - it says "no tests were found".
Now the plot twist: If I set working directory manually to a correct value - pycharm runs all tests correctly (with target value being blank).
I know have absolutely ridiculous situation where two IDENTICAL commands work differently.
1) If "target" is blank the command is:
/home/xxx/anaconda3/envs/xxx/bin/python /home/xxx/pycharm-2021.3.2/plugins/python/helpers/pycharm/django_test_manage.py test /home/xxx/path/to/project
Result: "No tests were found"
2) When I put /home/xxx/path/to/project as working directory, the command is:
/home/xxx/anaconda3/envs/xxx/bin/python /home/xxx/pycharm-2021.3.2/plugins/python/helpers/pycharm/django_test_manage.py test /home/xxx/path/to/project
yup, it's IDENTICAL
And now the tests are running.
Please sign in to leave a comment.
Yes, the django_test_manage.py script depends on the working directory, even though the run command is the same. If you don't have a target specified, the working directory is necessary to look for the tests.