@@ -73,29 +73,27 @@ def create_environ(python_version: str) -> Dict[str, str]:
7373 'MYPY_USE_MYPYC=1 MYPYC_OPT_LEVEL=2 PIP_NO_BUILD_ISOLATION=no'
7474 )
7575
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
7876 env ['CIBW_BEFORE_TEST' ] = (
79- 'pip install -r {project}/mypy/test-requirements.txt || true '
77+ 'pip install -r {project}/mypy/test-requirements.txt'
8078 )
8179
8280 # pytest looks for configuration files in the parent directories of where the tests live.
8381 # since we are trying to run the tests from their installed location, we copy those into
8482 # the venv. Ew ew ew.
8583 env ['CIBW_TEST_COMMAND' ] = """
86- ( ! pip list | grep lxml ) || (
84+ (
8785 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])')
8987 && 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
9189 )
9290 """ .replace ('\n ' , ' ' )
9391
9492 # i ran into some flaky tests on windows, so only run testcheck. it looks like we
9593 # previously didn't run any tests on windows wheels, so this is a net win.
9694 env ['CIBW_TEST_COMMAND_WINDOWS' ] = """
9795 bash -c "
98- ( ! pip list | grep lxml ) || (
96+ (
9997 DIR=$(python -c 'import mypy, os; dn = os.path.dirname; print(dn(dn(mypy.__path__[0])))')
10098 && TEST_DIR=$(python -c 'import mypy.test; print(mypy.test.__path__[0])')
10199 && cp '{project}/mypy/pytest.ini' '{project}/mypy/conftest.py' $DIR
0 commit comments