diff --git a/mypy/test/config.py b/mypy/test/config.py index 2dc4208b1e9d..85d420bdc437 100644 --- a/mypy/test/config.py +++ b/mypy/test/config.py @@ -1,12 +1,13 @@ from __future__ import annotations import os.path +from pathlib import Path provided_prefix = os.getenv("MYPY_TEST_PREFIX", None) if provided_prefix: PREFIX = provided_prefix else: - this_file_dir = os.path.dirname(os.path.realpath(__file__)) + this_file_dir = (Path(__file__)).resolve().parent PREFIX = os.path.dirname(os.path.dirname(this_file_dir)) # Location of test data files such as test case descriptions.