summaryrefslogtreecommitdiff
path: root/docs/quick_tutorial/functional_testing.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2018-10-07 03:48:18 -0700
committerSteve Piercy <web@stevepiercy.com>2018-10-07 04:26:35 -0700
commit8998f6fbaf526c0c0fe4300ec78815c7badfa826 (patch)
treebb7c1630855c047ae89c5855ff5c9b8e8781e851 /docs/quick_tutorial/functional_testing.rst
parent34a7a85436e1545356345affc21dd1a564635469 (diff)
downloadpyramid-8998f6fbaf526c0c0fe4300ec78815c7badfa826.tar.gz
pyramid-8998f6fbaf526c0c0fe4300ec78815c7badfa826.tar.bz2
pyramid-8998f6fbaf526c0c0fe4300ec78815c7badfa826.zip
Make webtest an extra dependency in setup.py.
Carry forward previous setup.py changes.
Diffstat (limited to 'docs/quick_tutorial/functional_testing.rst')
-rw-r--r--docs/quick_tutorial/functional_testing.rst43
1 files changed, 26 insertions, 17 deletions
diff --git a/docs/quick_tutorial/functional_testing.rst b/docs/quick_tutorial/functional_testing.rst
index 7c4dcee26..d3ada3793 100644
--- a/docs/quick_tutorial/functional_testing.rst
+++ b/docs/quick_tutorial/functional_testing.rst
@@ -31,31 +31,40 @@ Objectives
Steps
=====
-#. First we copy the results of the previous step, as well as install the
- ``webtest`` package:
+#. First we copy the results of the previous step.
- .. code-block:: bash
+ .. code-block:: bash
- cd ..; cp -r unit_testing functional_testing; cd functional_testing
- $VENV/bin/pip install -e .
- $VENV/bin/pip install webtest
+ cd ..; cp -r unit_testing functional_testing; cd functional_testing
-#. Let's extend ``functional_testing/tutorial/tests.py`` to include a
- functional test:
+#. Add ``webtest`` to our project's dependencies in ``setup.py`` as a :term:`Setuptools` "extra":
- .. literalinclude:: functional_testing/tutorial/tests.py
- :linenos:
+ .. literalinclude:: functional_testing/setup.py
+ :language: python
+ :linenos:
+ :emphasize-lines: 14
- Be sure this file is not executable, or ``pytest`` may not include your
- tests.
+#. Install our project and its newly added dependency.
+ Note that we use the extra specifier ``[test]`` to install testing requirements.
+
+ .. code-block:: bash
+
+ $VENV/bin/pip install -e .[test]
+
+#. Let's extend ``functional_testing/tutorial/tests.py`` to include a functional test:
+
+ .. literalinclude:: functional_testing/tutorial/tests.py
+ :linenos:
+
+ Be sure this file is not executable, or ``pytest`` may not include your tests.
-#. Now run the tests:
+#. Now run the tests:
- .. code-block:: bash
+ .. code-block:: bash
- $VENV/bin/pytest tutorial/tests.py -q
- ..
- 2 passed in 0.25 seconds
+ $VENV/bin/pytest tutorial/tests.py -q
+ ..
+ 2 passed in 0.25 seconds
Analysis