Skip to content

Commit aec55b1

Browse files
committed
Tests: Phase out zope.testrunner completely
1 parent c462630 commit aec55b1

File tree

4 files changed

+12
-42
lines changed

4 files changed

+12
-42
lines changed

DEVELOP.rst

Lines changed: 11 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,9 @@ Running tests
2525
=============
2626

2727
All 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

3332
Run all tests::
3433

@@ -37,35 +36,25 @@ Run all tests::
3736
Run 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

5146
The ``LayerTest`` test cases have quite some overhead. Omitting them will save
5247
a 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

6655
To inspect the whole list of test cases, run::
6756

68-
bin/test --list-tests
57+
pytest --collect-only
6958

7059
The CI setup on GitHub Actions (GHA) provides a full test matrix covering
7160
relevant 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/

bin/test

Lines changed: 0 additions & 17 deletions
This file was deleted.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,5 @@ lint = [
176176
]
177177

178178
test = [
179-
{ cmd = "bin/test" },
179+
{ cmd = "pytest" },
180180
]

setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def read(path):
7474
"pytz",
7575
"zc.customdoctests>=1.0.1,<2",
7676
"zope.testing>=4,<7",
77-
"zope.testrunner>=5,<8",
7877
],
7978
},
8079
python_requires=">=3.6",

0 commit comments

Comments
 (0)