|Version 9 (modified by jezdez, 5 years ago) (diff)|
Running the test framework
When you submit a patch, you should always attach tests. Here are the guidelines for running the test framework to, ahem, test your tests.
Tests should be run with [source:django/trunk/tests/runtests.py django/trunk/tests/runtests.py]
See also TestingDjango (I wasn't aware it existed before I started this).
To run tests, settings need to be provided.
Up to date official docs can be found here: http://docs.djangoproject.com/en/dev/internals/contributing/#running-the-unit-tests
Running only specific tests
This example runs only form tests:
$ python runtests.py --verbosity=2 --settings=test_settings.settings forms
With cunning shell trickery, it's e.g. possible to only run admin tests:
./runtests.py --settings=test_settings.settings `(cd regressiontests/; echo admin_*; )`