File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed
Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,4 @@ tbump~=6.11
66coverage~=7.12
77pytest
88pytest-cov~=7.0
9- mypy
9+ mypy; platform_python_implementation!="PyPy"
Original file line number Diff line number Diff line change 1919from typing import Any
2020from unittest import mock
2121
22- import mypy .build
2322import pytest
2423
2524import tests .testdata .python3 .data .fake_module_with_broken_getattr as fm_getattr
3736 object_build_class ,
3837)
3938
39+ try :
40+ import mypy .build
41+
42+ HAS_MYPY = True
43+ except ImportError :
44+ HAS_MYPY = False
45+
4046DUMMY_MOD = build_module ("DUMMY" )
4147
4248
@@ -173,6 +179,7 @@ def mocked_sys_modules_getitem(name: str) -> types.ModuleType | CustomGetattr:
173179 assert not err
174180
175181
182+ @pytest .mark .skipif (not HAS_MYPY , reason = "This test requires mypy" )
176183def test_missing__dict__ ():
177184 # This shouldn't raise an exception.
178185 object_build_class (DUMMY_MOD , mypy .build .ModuleNotFound )
You can’t perform that action at this time.
0 commit comments