From 5b48b39d862cd3c2626aab3d3a99de631dfb91d2 Mon Sep 17 00:00:00 2001 From: Jukka Lehtosalo Date: Tue, 19 Jul 2022 15:17:57 +0100 Subject: [PATCH] Fix checker test case collection by using correct test data prefix (#13190) Use `mypy.test.config.test_data_prefix` instead of hard coding it. This should fix mypy wheel builds. Fixes #13189 (hopefully). --- mypy/test/helpers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mypy/test/helpers.py b/mypy/test/helpers.py index 24b40f2add9c3..78b5d4c06ff42 100644 --- a/mypy/test/helpers.py +++ b/mypy/test/helpers.py @@ -22,7 +22,7 @@ from mypy.test.data import ( DataDrivenTestCase, fix_cobertura_filename, UpdateFile, DeleteFile ) -from mypy.test.config import test_temp_dir +from mypy.test.config import test_temp_dir, test_data_prefix import mypy.version skip = pytest.mark.skip @@ -500,6 +500,6 @@ def normalize_file_output(content: List[str], current_abs_path: str) -> List[str def find_test_files(pattern: str, exclude: Optional[List[str]] = None) -> List[str]: return [ path.name - for path in (pathlib.Path("./test-data/unit").rglob(pattern)) + for path in (pathlib.Path(test_data_prefix).rglob(pattern)) if path.name not in (exclude or []) ]