2

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.

Community
  • 1
  • 1
orange1
  • 2,647
  • 2
  • 25
  • 55

1 Answers1

8

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.

knbk
  • 49,685
  • 7
  • 113
  • 113