From 85ea016f8f88e6c42248af6c9414a01d06a7f2b5 Mon Sep 17 00:00:00 2001 From: Marc Mueller <30130371+cdce8p@users.noreply.github.com> Date: Sat, 11 Jan 2025 01:48:25 +0100 Subject: [PATCH] Fix mypyc wheel tests --- mypyc/test/test_run.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mypyc/test/test_run.py b/mypyc/test/test_run.py index 71367b25880b..03d9f0486107 100644 --- a/mypyc/test/test_run.py +++ b/mypyc/test/test_run.py @@ -24,6 +24,7 @@ from mypyc.codegen import emitmodule from mypyc.errors import Errors from mypyc.options import CompilerOptions +from mypyc.test.config import test_data_prefix from mypyc.test.test_serialization import check_serialization_roundtrip from mypyc.test.testutil import ( ICODE_GEN_BUILTINS, @@ -291,9 +292,7 @@ def run_case_step(self, testcase: DataDrivenTestCase, incremental_step: int) -> # No driver.py provided by test case. Use the default one # (mypyc/test-data/driver/driver.py) that calls each # function named test_*. - default_driver = os.path.join( - os.path.dirname(__file__), "..", "test-data", "driver", "driver.py" - ) + default_driver = os.path.join(test_data_prefix, "driver", "driver.py") shutil.copy(default_driver, driver_path) env = os.environ.copy() env["MYPYC_RUN_BENCH"] = "1" if bench else "0"