summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki/tests.rst
diff options
context:
space:
mode:
authorBert JW Regeer <bertjw@regeer.org>2016-04-12 18:03:57 -0600
committerBert JW Regeer <bertjw@regeer.org>2016-04-12 18:03:57 -0600
commitf3420699895969e825913da51dedfa5b880bc7d5 (patch)
tree40bace55d7c03e53c490b465df2b5b27e024b1a6 /docs/tutorials/wiki/tests.rst
parentc8a9a4a279b7568657c5dc3e8f2ad8da31be5890 (diff)
parentefaf7300c9c3ef2a795aae7f724bf5b02e96cd75 (diff)
downloadpyramid-f3420699895969e825913da51dedfa5b880bc7d5.tar.gz
pyramid-f3420699895969e825913da51dedfa5b880bc7d5.tar.bz2
pyramid-f3420699895969e825913da51dedfa5b880bc7d5.zip
Merge branch 'master' into feature/BeforeTraversal
Diffstat (limited to 'docs/tutorials/wiki/tests.rst')
-rw-r--r--docs/tutorials/wiki/tests.rst46
1 files changed, 9 insertions, 37 deletions
diff --git a/docs/tutorials/wiki/tests.rst b/docs/tutorials/wiki/tests.rst
index e255812fc..788ec595b 100644
--- a/docs/tutorials/wiki/tests.rst
+++ b/docs/tutorials/wiki/tests.rst
@@ -1,3 +1,5 @@
+.. _wiki_adding_tests:
+
============
Adding Tests
============
@@ -49,55 +51,25 @@ follows:
Running the tests
=================
-We can run these tests by using ``setup.py test`` in the same way we did in
-:ref:`running_tests`. However, first we must edit our ``setup.py`` to
-include a dependency on WebTest, which we've used in our ``tests.py``.
-Change the ``requires`` list in ``setup.py`` to include ``WebTest``.
-
-.. literalinclude:: src/tests/setup.py
- :linenos:
- :language: python
- :lines: 11-22
- :emphasize-lines: 11
-
-After we've added a dependency on WebTest in ``setup.py``, we need to run
-``setup.py develop`` to get WebTest installed into our virtualenv. Assuming
-our shell's current working directory is the "tutorial" distribution
-directory:
-
-On UNIX:
-
-.. code-block:: text
-
- $ $VENV/bin/python setup.py develop
-
-On Windows:
-
-.. code-block:: text
-
- c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py develop
-
-Once that command has completed successfully, we can run the tests
-themselves:
+We can run these tests by using ``py.test`` similarly to how we did in
+:ref:`running_tests`. Our testing dependencies have already been satisfied,
+courtesy of the scaffold, so we can jump right to running tests.
On UNIX:
.. code-block:: text
- $ $VENV/bin/python setup.py test -q
+ $ $VENV/bin/py.test tutorial/tests.py -q
On Windows:
.. code-block:: text
- c:\pyramidtut\tutorial> %VENV%\Scripts\python setup.py test -q
+ c:\pyramidtut\tutorial> %VENV%\Scripts\py.test tutorial/tests.py -q
The expected result should look like the following:
.. code-block:: text
- .........
- ----------------------------------------------------------------------
- Ran 23 tests in 1.653s
-
- OK
+ ........................
+ 24 passed in 2.46 seconds