Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I have run into this same situation as well. Using the suite it will allow you to run all tests, or tests for an app, but not a specific test case or a specific test.</p> <p>It's pretty hacky, but what I've done to get around this is instead of defining a suite in <code>__init__.py</code> is to just <code>import *</code> from all of the other test modules, it sucks but it works. </p> <p>There are a few things that I do to help make sure that I don't end up clobbering test suites in other modules... have <code>__all__</code> declared in each test modules so only the test names are imported with the * and keep pylint running I'm notified of class name redefinitions. </p> <p>Having said that you should be able to get this to work without any ugly <code>import *</code> crap... I do not use nose and django-nose...(which I intend to correct very soon)... since that is what you're doing it looks like you can do this to run all of the tests in your apps directory:</p> <pre><code>python manage.py test apps </code></pre> <p>or to run all of the tests for a single test module:</p> <pre><code>python manage.py test apps.my_app.tests.storage_tests </code></pre> <p>notice I did not include the project in the previous example... which seemed to work fine for me using nosetests and django-nose.</p> <p>Also, to run a specific test suite you can do this:</p> <pre><code>python manage.py test apps.my_app.tests.storage_tests:TestCase </code></pre> <p>Or to run one specific test:</p> <pre><code>python manage.py test apps.my_app.tests.storage_tests:TestCase.test_name </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload