Skip to content

Commit

Permalink
test: Adjust expected paths in .pyc for Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Górny <[email protected]>
  • Loading branch information
mgorny committed Jul 16, 2024
1 parent df543d9 commit 6583781
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def all_files(top_path):
# source path was embedded inside it
loader = importlib.machinery.SourcelessFileLoader(
"testpkg", file_path)
data = loader.get_code("testpkg").co_filename
data = pathlib.Path(loader.get_code("testpkg").co_filename)
elif f.endswith(".exe"):
data = ""
else:
Expand Down Expand Up @@ -266,7 +266,7 @@ def test_install_wheel(tmp_path, optimize, prefix):
for opt in opt_levels:
pyc = importlib.util.cache_from_source(
init_mod, optimization=opt if opt != 0 else "")
expected[pathlib.Path(pyc)] = (nonexec, "/" + init_mod)
expected[pathlib.Path(pyc)] = (nonexec, pathlib.Path(f"/{init_mod}"))

assert expected == dict(all_files(tmp_path))

Expand Down

0 comments on commit 6583781

Please sign in to comment.