summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2024-02-07 20:52:33 -0700
committerMichael Merickel <michael@merickel.org>2024-02-07 20:52:33 -0700
commit222386e96a1711b6215f64ea809a9f4a7a8c2202 (patch)
tree117c54cd9468f5b007d11792b910860a8a18700c
parentb2c8840708079ad645cd7abea45634d4b8686eb8 (diff)
downloadpyramid-222386e96a1711b6215f64ea809a9f4a7a8c2202.tar.gz
pyramid-222386e96a1711b6215f64ea809a9f4a7a8c2202.tar.bz2
pyramid-222386e96a1711b6215f64ea809a9f4a7a8c2202.zip
sync language from zodb tutorial for test sections
-rw-r--r--docs/tutorials/wiki2/tests.rst25
1 files changed, 8 insertions, 17 deletions
diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst
index 82bf0672f..62b436401 100644
--- a/docs/tutorials/wiki2/tests.rst
+++ b/docs/tutorials/wiki2/tests.rst
@@ -20,30 +20,21 @@ The test module would have the same name with the prefix ``test_``.
The harness consists of the following setup:
-- ``[tool.pytest.ini_options]`` in ``pyproject.toml``.
+- The ``project.optional-dependencies`` stanza of ``pyproject.toml`` - controls the dependencies installed when testing.
+ When the list is changed, it is necessary to re-run ``$VENV/bin/pip install -e ".[testing]"`` to ensure the new dependencies are installed.
- Controls basic ``pytest`` config including where to find the tests.
+- The ``tool.pytest.ini_options`` stanza of ``pyproject.toml`` controls basic ``pytest`` configuration, including where to find the tests.
We have configured ``pytest`` to search for tests in the application package and in the ``tests`` package.
-- ``[tool.coverage.run]`` in ``pyproject.toml``.
-
+- The ``tool.coverage.run`` stanza of ``pyproject.toml`` controls coverage config.
In our setup, it works with the ``pytest-cov`` plugin that we use via the ``--cov`` options to the ``pytest`` command.
-- ``testing.ini``
-
- A mirror of ``development.ini`` and ``production.ini`` that contains settings used for executing the test suite.
+- The ``testing.ini`` file is a mirror of ``development.ini`` and ``production.ini`` that contains settings used for executing the test suite.
Most importantly, it contains the database connection information used by tests that require the database.
-- ``testing`` optional dependencies in ``[project.optional-dependencies]`` section of ``pyproject.toml``.
-
- Controls the dependencies installed when testing.
- When the list is changed, it's necessary to re-run ``$VENV/bin/pip install -e ".[testing]"`` to ensure the new dependencies are installed.
-
-- ``tests/conftest.py``.
-
- The core fixtures available throughout our tests.
- The fixtures are explained in more detail below.
-
+- The ``tests/conftest.py`` file defines the core fixtures available throughout our tests.
+ The fixtures are explained in more detail in the following sections.
+ Open ``tests/conftest.py`` and follow along.
Session-scoped test fixtures
----------------------------