Skip to content

Commit 39e5296

Browse files
fix: disable pytest-beartype-tests in nested collection runs (#3132)
Avoids beartype/beartype#637 which prevented ci/test_custom_linters.py from passing on Python 3.14. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 95ed37b commit 39e5296

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

ci/test_custom_linters.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,14 @@ def _tests_from_pattern(*, ci_pattern: str) -> set[str]:
4747
# before any items are collected.
4848
"-p",
4949
"no:pytest-retry",
50+
# Disable pytest-beartype-tests to avoid
51+
# https://github.com/beartype/beartype/issues/637 — wrapping
52+
# collected items with @beartype installs a buggy
53+
# __annotate_beartype__ closure on the underlying test
54+
# function, which crashes a subsequent nested collection on
55+
# Python 3.14.
56+
"-p",
57+
"no:pytest_beartype_tests",
5058
# Disable warnings to avoid many instances of:
5159
# ```
5260
# Unknown config option: retry_delay
@@ -78,6 +86,14 @@ def test_ci_patterns_valid(request: pytest.FixtureRequest) -> None:
7886
# ````
7987
"-p",
8088
"no:pytest-retry",
89+
# Disable pytest-beartype-tests to avoid
90+
# https://github.com/beartype/beartype/issues/637 —
91+
# wrapping collected items with @beartype installs a
92+
# buggy __annotate_beartype__ closure on the underlying
93+
# test function, which crashes a subsequent nested
94+
# collection on Python 3.14.
95+
"-p",
96+
"no:pytest_beartype_tests",
8197
# Disable warnings to avoid many instances of:
8298
# ```
8399
# Unknown config option: retry_delay

0 commit comments

Comments
 (0)