Skip to content

Commit 5b48b39

Browse files
authored
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).
1 parent fbbcc50 commit 5b48b39

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/test/helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from mypy.test.data import (
2323
DataDrivenTestCase, fix_cobertura_filename, UpdateFile, DeleteFile
2424
)
25-
from mypy.test.config import test_temp_dir
25+
from mypy.test.config import test_temp_dir, test_data_prefix
2626
import mypy.version
2727

2828
skip = pytest.mark.skip
@@ -500,6 +500,6 @@ def normalize_file_output(content: List[str], current_abs_path: str) -> List[str
500500
def find_test_files(pattern: str, exclude: Optional[List[str]] = None) -> List[str]:
501501
return [
502502
path.name
503-
for path in (pathlib.Path("./test-data/unit").rglob(pattern))
503+
for path in (pathlib.Path(test_data_prefix).rglob(pattern))
504504
if path.name not in (exclude or [])
505505
]

0 commit comments

Comments
 (0)