Skip to content

Commit 11fa4d2

Browse files
committed
fix(test): move pyximport into test_cython, drop wiring conftest
pytest.importorskip("Cython") gates the pyximport.install call so non-Cython tox envs (pydantic-v1, pydantic-v2) skip the module at collection instead of crashing on missing pyximport.
1 parent 6eeb37f commit 11fa4d2

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

tests/unit/wiring/conftest.py

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

tests/unit/wiring/test_cython.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
import pytest
44

5+
pytest.importorskip("Cython")
6+
7+
import pyximport # noqa: E402
8+
9+
pyximport.install(language_level=3)
10+
511
cythonmodule = pytest.importorskip(
612
"samples.wiringcython.cythonmodule",
713
reason="Cython fixture not built (Cython / C toolchain missing)",

0 commit comments

Comments
 (0)