I have a Django project with multiple apps, app_1, app_2, and app_3. Currently, in order to run the test suite, I use the standard testing command: python manage.py test. This runs the tests for all of my apps. I am also able to run tests for a single app, specifically -- for example, python manage.py test app_1/. However, I'd like to be able to run all of the tests in some, but not all, of my apps. For example, I'd run python manage.py test main_tests and just have the tests in app_1 and app_2 run. Is there a way to do this?
I saw that this question specified how to run just a few tests within a single app, but not how to run just a few apps' tests within a project.
You can supply multiple labels to the test command:
python manage.py test app_1 app_2
This will run all tests in app_1 and app_2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With