Run multiple Django application tests with one command
<p>I have a Django project with multiple apps, <code>app_1</code>, <code>app_2</code>, and <code>app_3</code>. Currently, in order to run the test suite, I use the standard testing command: <code>python manage.py test</code>. This runs the tests for all of my apps. I am also able to run tests for a single app, specifically -- for example, <code>python manage.py test app_1/</code>. 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 <code>python manage.py test main_tests</code> and just have the tests in <code>app_1</code> and <code>app_2</code> run. Is there a way to do this? </p>

<p>I saw that <a href="http://stackoverflow.com/questions/6510680/how-do-i-group-unit-tests-in-django-at-a-higher-granularity-than-the-app">this</a> 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.</p>

<p>You can supply multiple labels to the <code>test</code> command:</p>

<pre><code>python manage.py test app_1 app_2
</code></pre>

<p>This will run all tests in <code>app_1</code> and <code>app_2</code>. </p>

python django unit-testing