File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Setup for test suite."""
22
33import uuid
4+
5+ # pytest-beartype evaluates fixture annotations at runtime.
6+ from collections .abc import Generator # noqa: TC003
47from doctest import ELLIPSIS
5- from typing import TYPE_CHECKING
68
79import pytest
810from mock_vws import MockVWS
1416 PythonCodeBlockParser ,
1517)
1618
17- if TYPE_CHECKING :
18- from collections .abc import Generator
19-
2019
2120@pytest .fixture (name = "mock_vws" )
2221def fixture_mock_vws (
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ urls.Source = "https://github.com/VWS-Python/vws-auth-tools"
3838[dependency-groups ]
3939dev = [
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
385386analysis.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
388393log_cli = true
389394xfail_strict = true
390395
You can’t perform that action at this time.
0 commit comments