summaryrefslogtreecommitdiff
path: root/docs/tutorials/wiki2/tests.rst
diff options
context:
space:
mode:
authorMichael Merickel <michael@merickel.org>2024-02-04 17:05:54 -0700
committerMichael Merickel <michael@merickel.org>2024-02-04 17:05:54 -0700
commit94ddd8d0519aeb1fe151059048ac365b18574cd0 (patch)
tree650d0564201a2ac6276f5ad66119a6b7efff300c /docs/tutorials/wiki2/tests.rst
parent66c6c321b267e112220cfcfd81772923e3691e77 (diff)
downloadpyramid-94ddd8d0519aeb1fe151059048ac365b18574cd0.tar.gz
pyramid-94ddd8d0519aeb1fe151059048ac365b18574cd0.tar.bz2
pyramid-94ddd8d0519aeb1fe151059048ac365b18574cd0.zip
upgrade tests chapter
Diffstat (limited to 'docs/tutorials/wiki2/tests.rst')
-rw-r--r--docs/tutorials/wiki2/tests.rst19
1 files changed, 14 insertions, 5 deletions
diff --git a/docs/tutorials/wiki2/tests.rst b/docs/tutorials/wiki2/tests.rst
index dce14cf9b..82bf0672f 100644
--- a/docs/tutorials/wiki2/tests.rst
+++ b/docs/tutorials/wiki2/tests.rst
@@ -20,19 +20,28 @@ The test module would have the same name with the prefix ``test_``.
The harness consists of the following setup:
-- ``pytest.ini`` - controls basic ``pytest`` config including where to find the tests.
+- ``[tool.pytest.ini_options]`` in ``pyproject.toml``.
+
+ Controls basic ``pytest`` config including where to find the tests.
We have configured ``pytest`` to search for tests in the application package and in the ``tests`` package.
-- ``.coveragerc`` - controls coverage config.
+- ``[tool.coverage.run]`` in ``pyproject.toml``.
+
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.
+- ``testing.ini``
+
+ 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.
-- ``tests_require`` in ``setup.py`` - controls the dependencies installed when testing.
+- ``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.
+- ``tests/conftest.py``.
+
+ The core fixtures available throughout our tests.
The fixtures are explained in more detail below.