summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/tests.rst
diff options
context:
space:
mode:
authorSteve Piercy <web@stevepiercy.com>2020-01-01 21:21:25 -0800
committerSteve Piercy <web@stevepiercy.com>2020-01-02 23:30:59 -0800
commitbd42bcaee1176ee5bb0cc7bf311e8e91070eea88 (patch)
tree0c54746e90ac84c014806de6217439893a1c2b1d /docs/tutorials/wiki2/tests.rst
parent6175ff659c2523974072b404636911ebb89c2d42 (diff)
downloadpyramid-bd42bcaee1176ee5bb0cc7bf311e8e91070eea88.tar.gz
pyramid-bd42bcaee1176ee5bb0cc7bf311e8e91070eea88.tar.bz2
pyramid-bd42bcaee1176ee5bb0cc7bf311e8e91070eea88.zip
Resync wiki2/*.rst and related files after moving tests directory
Diffstat (limited to 'docs/tutorials/wiki2/tests.rst')
-rw-r--r--docs/tutorials/wiki2/tests.rst39
1 files changed, 18 insertions, 21 deletions
diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst
index 941a50928..bc11b16e1 100644
--- a/docs/tutorials/wiki2/tests.rst
+++ b/docs/tutorials/wiki2/tests.rst
@@ -5,18 +5,15 @@ Adding Tests
============
We will now add tests for the models and views as well as a few functional
-tests in a new ``tests`` subpackage. Tests ensure that an application works,
+tests in a new ``tests`` package. Tests ensure that an application works,
and that it continues to work when changes are made in the future.
-The file ``tests.py`` was generated from choosing the ``sqlalchemy`` backend
-option, but it is a common practice to put tests into a ``tests``
-subpackage, especially as projects grow in size and complexity. Each module in
-the test subpackage should contain tests for its corresponding module in our
-application. Each corresponding pair of modules should have the same names,
-except the test module should have the prefix ``test_``.
+The file ``tests/test_it.py`` at the root of our project directory was generated from choosing the ``sqlalchemy`` backend option.
+It is a common practice to put tests into a ``tests`` package alongside the application package, especially as projects grow in size and complexity.
+Each module in the test package should contain tests for its corresponding module in our application.
+Each corresponding pair of modules should have the same names, except the test module should have the prefix ``test_``.
-Start by deleting ``tests.py``, then create a new directory to contain our new
-tests as well as a new empty file ``tests/__init__.py``.
+Start by deleting ``tests/test_it.py``.
.. warning::
@@ -47,36 +44,36 @@ user cannot edit pages that it didn't create but the ``editor`` user can, and
so on.
-View the results of all our edits to ``tests`` subpackage
-=========================================================
+View the results of all our edits to ``tests`` package
+======================================================
-Create ``tutorial/tests/test_views.py`` such that it appears as follows:
+Create ``tests/test_views.py`` such that it appears as follows:
-.. literalinclude:: src/tests/tutorial/tests/test_views.py
+.. literalinclude:: src/tests/tests/test_views.py
:linenos:
:language: python
-Create ``tutorial/tests/test_functional.py`` such that it appears as follows:
+Create ``tests/test_functional.py`` such that it appears as follows:
-.. literalinclude:: src/tests/tutorial/tests/test_functional.py
+.. literalinclude:: src/tests/tests/test_functional.py
:linenos:
:language: python
-Create ``tutorial/tests/test_initdb.py`` such that it appears as follows:
+Create ``tests/test_initdb.py`` such that it appears as follows:
-.. literalinclude:: src/tests/tutorial/tests/test_initdb.py
+.. literalinclude:: src/tests/tests/test_initdb.py
:linenos:
:language: python
-Create ``tutorial/tests/test_security.py`` such that it appears as follows:
+Create ``tests/test_security.py`` such that it appears as follows:
-.. literalinclude:: src/tests/tutorial/tests/test_security.py
+.. literalinclude:: src/tests/tests/test_security.py
:linenos:
:language: python
-Create ``tutorial/tests/test_user_model.py`` such that it appears as follows:
+Create ``tests/test_user_model.py`` such that it appears as follows:
-.. literalinclude:: src/tests/tutorial/tests/test_user_model.py
+.. literalinclude:: src/tests/tests/test_user_model.py
:linenos:
:language: python