Skip to content

Commit 0af50b3

Browse files
committed
Replace pytest-beartype-tests with pytest-beartype
1 parent 5fc7871 commit 0af50b3

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

‎conftest.py‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
"""Setup for test suite."""
22

33
import uuid
4+
5+
# pytest-beartype evaluates fixture annotations at runtime.
6+
from collections.abc import Generator # noqa: TC003
47
from doctest import ELLIPSIS
5-
from typing import TYPE_CHECKING
68

79
import pytest
810
from mock_vws import MockVWS
@@ -14,9 +16,6 @@
1416
PythonCodeBlockParser,
1517
)
1618

17-
if TYPE_CHECKING:
18-
from collections.abc import Generator
19-
2019

2120
@pytest.fixture(name="mock_vws")
2221
def fixture_mock_vws(

‎pyproject.toml‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ urls.Source = "https://github.com/VWS-Python/vws-auth-tools"
3838
[dependency-groups]
3939
dev = [
4040
"actionlint-py==1.7.12.25",
41+
"beartype==0.23.0rc2",
4142
"check-manifest==0.51",
4243
"deptry==0.25.1",
4344
"doc8==2.0.0",
@@ -58,7 +59,7 @@ dev = [
5859
"pyright==1.1.414",
5960
"pyroma==5.0.1",
6061
"pytest==9.1.1",
61-
"pytest-beartype-tests==2026.8.16",
62+
"pytest-beartype==0.3.0",
6263
"pytest-cov==7.1.0",
6364
"requests==2.34.2",
6465
"ruff==0.16.9",
@@ -385,6 +386,10 @@ analysis.strict-equality-semantics = true
385386
analysis.strict-generic-narrowing = true
386387

387388
[tool.pytest]
389+
# This package is imported before pytest-beartype installs the import hook.
390+
# Source functions already use @beartype.
391+
beartype_test_fixtures = true
392+
beartype_tests = true
388393
log_cli = true
389394
xfail_strict = true
390395

0 commit comments

Comments
 (0)