Skip to content

Commit

Permalink
Fix checker test case collection by using correct test data prefix (#…
Browse files Browse the repository at this point in the history
…13190)

Use `mypy.test.config.test_data_prefix` instead of hard coding it. This
should fix mypy wheel builds.

Fixes #13189 (hopefully).
  • Loading branch information
JukkaL authored Jul 19, 2022
1 parent fbbcc50 commit 5b48b39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mypy/test/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 [])
]

0 comments on commit 5b48b39

Please sign in to comment.