Skip to content

Commit 5cbbc45

Browse files
committed
Restore pytest-beartype-tests; disable plugin in repeated pytest.main calls
1 parent a82561a commit 5cbbc45

3 files changed

Lines changed: 15 additions & 8 deletions

File tree

ci/test_custom_linters.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ def _tests_from_pattern(
3939
"--collect-only",
4040
# If there are any warnings, these obscure the output.
4141
"--disable-warnings",
42+
# Disable ``pytest-beartype-tests`` to avoid repeated wrapping
43+
# of the same test functions across many ``pytest.main`` calls,
44+
# which can trigger ``Cannot stringify annotation containing
45+
# string formatting`` under Python 3.14 deferred annotations.
46+
"-p",
47+
"no:pytest_beartype_tests",
4248
ci_pattern,
4349
],
4450
)
@@ -70,6 +76,13 @@ def test_ci_patterns_valid(request: pytest.FixtureRequest) -> None:
7076
# ````
7177
"-p",
7278
"no:pytest-retry",
79+
# Disable ``pytest-beartype-tests`` to avoid repeated
80+
# wrapping of the same test functions across many
81+
# ``pytest.main`` calls, which can trigger ``Cannot
82+
# stringify annotation containing string formatting``
83+
# under Python 3.14 deferred annotations.
84+
"-p",
85+
"no:pytest_beartype_tests",
7386
# Disable warnings to avoid many instances of:
7487
# ```
7588
# Unknown config option: retry_delay

conftest.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
"""
2-
Setup for Sybil.
3-
4-
Beartype is not applied to test functions because of a Python 3.14
5-
annotation issue. See:
6-
- https://github.com/beartype/beartype/discussions/594
7-
- https://github.com/beartype/beartype/pull/440
8-
"""
1+
"""Setup for Sybil."""
92

103
from doctest import ELLIPSIS
114

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ optional-dependencies.dev = [
7777
"pyright==1.1.408",
7878
"pyroma==5.0.1",
7979
"pytest==9.0.3",
80+
"pytest-beartype-tests==2026.4.20",
8081
"pytest-retry==1.7.0",
8182
"pytest-xdist==3.8.0",
8283
"pyyaml==6.0.3",

0 commit comments

Comments
 (0)