@@ -73,29 +73,27 @@ def create_environ(python_version: str) -> Dict[str, str]:
73
73
'MYPY_USE_MYPYC=1 MYPYC_OPT_LEVEL=2 PIP_NO_BUILD_ISOLATION=no'
74
74
)
75
75
76
- # lxml is slow to build wheels for new releases, so allow installing reqs to fail
77
- # if we failed to install lxml, we'll skip tests, but allow the build to succeed
78
76
env ['CIBW_BEFORE_TEST' ] = (
79
- 'pip install -r {project}/mypy/test-requirements.txt || true '
77
+ 'pip install -r {project}/mypy/test-requirements.txt'
80
78
)
81
79
82
80
# pytest looks for configuration files in the parent directories of where the tests live.
83
81
# since we are trying to run the tests from their installed location, we copy those into
84
82
# the venv. Ew ew ew.
85
83
env ['CIBW_TEST_COMMAND' ] = """
86
- ( ! pip list | grep lxml ) || (
84
+ (
87
85
DIR=$(python -c 'import mypy, os; dn = os.path.dirname; print(dn(dn(mypy.__path__[0])))')
88
- && TEST_DIR =$(python -c 'import mypy.test; print(mypy.test.__path__[0])')
86
+ && TEST_DIRS =$(python -c 'import mypy.test; import mypyc.test; print(mypy.test.__path__[0], mypyc .test.__path__[0])')
89
87
&& cp '{project}/mypy/pytest.ini' '{project}/mypy/conftest.py' $DIR
90
- && MYPY_TEST_PREFIX='{project}/mypy' pytest $TEST_DIR
88
+ && MYPY_TEST_PREFIX='{project}/mypy' pytest $TEST_DIRS
91
89
)
92
90
""" .replace ('\n ' , ' ' )
93
91
94
92
# i ran into some flaky tests on windows, so only run testcheck. it looks like we
95
93
# previously didn't run any tests on windows wheels, so this is a net win.
96
94
env ['CIBW_TEST_COMMAND_WINDOWS' ] = """
97
95
bash -c "
98
- ( ! pip list | grep lxml ) || (
96
+ (
99
97
DIR=$(python -c 'import mypy, os; dn = os.path.dirname; print(dn(dn(mypy.__path__[0])))')
100
98
&& TEST_DIR=$(python -c 'import mypy.test; print(mypy.test.__path__[0])')
101
99
&& cp '{project}/mypy/pytest.ini' '{project}/mypy/conftest.py' $DIR
0 commit comments