@@ -25,10 +25,9 @@ Running tests
2525=============
2626
2727All tests will be invoked using the Python interpreter that was used when
28- creating the Python virtualenv. The test runner is `zope.testrunner `_.
28+ creating the Python virtualenv. The test runner is `pytest `_.
2929
30- Some examples are outlined below. In order to learn about more details,
31- see, for example, `useful command-line options for zope-testrunner `_.
30+ Some examples are outlined below.
3231
3332Run all tests::
3433
@@ -37,35 +36,25 @@ Run all tests::
3736Run specific tests::
3837
3938 # Select modules.
40- bin/test -t test_cursor
41- bin/test -t client
42- bin/test -t testing
39+ pytest -k test_cursor
40+ pytest -k client
41+ pytest -k testing
4342
4443 # Select doctests.
45- bin/test -t http.rst
46-
47- Ignore specific test directories::
48-
49- bin/test --ignore_dir=testing
44+ pytest -k http.rst
5045
5146The ``LayerTest `` test cases have quite some overhead. Omitting them will save
5247a few cycles (~70 seconds runtime)::
5348
54- bin/test -t '!LayerTest'
55-
56- Invoke all tests without integration tests (~10 seconds runtime)::
57-
58- bin/test --layer '!crate.testing.layer.crate' --test '!LayerTest'
49+ pytest -k 'not LayerTest'
5950
60- Yet ~60 test cases, but only ~1 second runtime::
51+ Yet ~75 test cases, but only ~2 seconds runtime::
6152
62- bin/test --layer '!crate.testing.layer.crate' --test '!LayerTest' \
63- -t '!test_client_threaded' -t '!test_no_retry_on_read_timeout' \
64- -t '!test_wait_for_http' -t '!test_table_clustered_by'
53+ pytest -k 'not (layer or multithreaded or read_timeout or wait_for or clustered_by or keep_alive)'
6554
6655To inspect the whole list of test cases, run::
6756
68- bin/test --list-tests
57+ pytest --collect-only
6958
7059The CI setup on GitHub Actions (GHA) provides a full test matrix covering
7160relevant Python versions. You can invoke the software tests against a specific
@@ -163,14 +152,13 @@ nothing special you need to do to get the live docs to update.
163152.. _@crate/docs : https://github.com/orgs/crate/teams/docs
164153.. _buildout : https://pypi.python.org/pypi/zc.buildout
165154.. _PyPI : https://pypi.python.org/pypi
155+ .. _pytest : https://pytest.org/
166156.. _Python versions : https://docs.astral.sh/uv/concepts/python-versions/
167157.. _Read the Docs : http://readthedocs.org
168158.. _ReStructuredText : http://docutils.sourceforge.net/rst.html
169159.. _Sphinx : http://sphinx-doc.org/
170160.. _tests/assets/pki/*.pem : https://github.com/crate/crate-python/tree/main/tests/assets/pki
171161.. _twine : https://pypi.python.org/pypi/twine
172- .. _useful command-line options for zope-testrunner : https://pypi.org/project/zope.testrunner/#some-useful-command-line-options-to-get-you-started
173162.. _uv : https://docs.astral.sh/uv/
174163.. _UV_PYTHON : https://docs.astral.sh/uv/configuration/environment/#uv_python
175164.. _versions hosted on ReadTheDocs : https://readthedocs.org/projects/crate-python/versions/
176- .. _zope.testrunner : https://pypi.org/project/zope.testrunner/
0 commit comments