aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTom Christie2014-08-19 16:29:05 +0100
committerTom Christie2014-08-19 16:29:05 +0100
commit00c0dfc66fd2426a63e6eec498395740b2c3e63b (patch)
treef29f157bccee87239c55b8e664c20ccee97d3885
parent5358243ca5e35dcb28ce96175c4f8f58504513aa (diff)
downloaddjango-rest-framework-00c0dfc66fd2426a63e6eec498395740b2c3e63b.tar.bz2
Documentation on runtests.py
-rw-r--r--docs/topics/contributing.md38
1 files changed, 36 insertions, 2 deletions
diff --git a/docs/topics/contributing.md b/docs/topics/contributing.md
index d33843e1..3400bc8f 100644
--- a/docs/topics/contributing.md
+++ b/docs/topics/contributing.md
@@ -62,10 +62,44 @@ To run the tests, clone the repository, and then:
virtualenv env
source env/bin/activate
pip install -r requirements.txt
- pip install -r optionals.txt
+ pip install -r requirements-test.txt
# Run the tests
- py.test
+ ./runtests.py
+
+### Test options
+
+Run using a more concise output style.
+
+ ./runtests -q
+
+Run the tests using a more concise output style, no coverage, no flake8.
+
+ ./runtests --fast
+
+Don't run the flake8 code linting.
+
+ ./runtests --nolint
+
+Only run the flake8 code linting, don't run the tests.
+
+ ./runtests --lintonly
+
+Run the tests for a given test case.
+
+ ./runtests MyTestCase
+
+Run the tests for a given test method.
+
+ ./runtests MyTestCase.test_this_method
+
+Shorter form to run the tests for a given test method.
+
+ ./runtests test_this_method
+
+Note: The test case and test method matching is fuzzy and will sometimes run other tests that contain a partial string match to the given command line input.
+
+### Running against multiple environments
You can also use the excellent [tox][tox] testing tool to run the tests against all supported versions of Python and Django. Install `tox` globally, and then simply run: