aboutsummaryrefslogtreecommitdiffstats
path: root/topics/contributing.html
diff options
context:
space:
mode:
Diffstat (limited to 'topics/contributing.html')
-rw-r--r--topics/contributing.html28
1 files changed, 26 insertions, 2 deletions
diff --git a/topics/contributing.html b/topics/contributing.html
index 48664297..4fc3efec 100644
--- a/topics/contributing.html
+++ b/topics/contributing.html
@@ -255,11 +255,35 @@ a.fusion-poweredby {
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
-rest_framework/runtests/runtests.py
+./runtests.py
</code></pre>
+<h3 id="test-options">Test options</h3>
+<p>Run using a more concise output style.</p>
+<pre class="prettyprint lang-py"><code>./runtests -q
+</code></pre>
+<p>Run the tests using a more concise output style, no coverage, no flake8.</p>
+<pre class="prettyprint lang-py"><code>./runtests --fast
+</code></pre>
+<p>Don't run the flake8 code linting.</p>
+<pre class="prettyprint lang-py"><code>./runtests --nolint
+</code></pre>
+<p>Only run the flake8 code linting, don't run the tests.</p>
+<pre class="prettyprint lang-py"><code>./runtests --lintonly
+</code></pre>
+<p>Run the tests for a given test case.</p>
+<pre class="prettyprint lang-py"><code>./runtests MyTestCase
+</code></pre>
+<p>Run the tests for a given test method.</p>
+<pre class="prettyprint lang-py"><code>./runtests MyTestCase.test_this_method
+</code></pre>
+<p>Shorter form to run the tests for a given test method.</p>
+<pre class="prettyprint lang-py"><code>./runtests test_this_method
+</code></pre>
+<p>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.</p>
+<h3 id="running-against-multiple-environments">Running against multiple environments</h3>
<p>You can also use the excellent <a href="http://tox.readthedocs.org/en/latest/">tox</a> testing tool to run the tests against all supported versions of Python and Django. Install <code>tox</code> globally, and then simply run:</p>
<pre class="prettyprint lang-py"><code>tox
</code></pre>