Skip to content

Commit

Permalink
Fix mypyc wheel tests (#18444)
Browse files Browse the repository at this point in the history
#18416 removed the `mypyc/test-data` package from the wheel. This caused
the wheel tests to fail. Use the `test_data_prefix` instead which uses
the existing `MYPY_TEST_PREFIX` to determine the correct file location.

https://github.com/mypyc/mypy_mypyc-wheels/actions/runs/12712285989
  • Loading branch information
cdce8p authored Jan 11, 2025
1 parent d86b1e5 commit 1affabe
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mypyc/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 1affabe

Please sign in to comment.