Skip to content

Commit 6a36fb2

Browse files
authored
Make tests pass on Windows (#82)
1 parent ed0bfef commit 6a36fb2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

stub_uploader/build_wheel.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import os.path
2222
import shutil
2323
import subprocess
24+
import sys
2425
import tempfile
2526
from textwrap import dedent
2627
from typing import Optional
@@ -285,8 +286,8 @@ def main(
285286
copy_changelog(distribution, tmpdir)
286287
current_dir = os.getcwd()
287288
os.chdir(tmpdir)
288-
subprocess.run(["python3", "setup.py", "bdist_wheel"])
289-
subprocess.run(["python3", "setup.py", "sdist"])
289+
subprocess.run([sys.executable, "setup.py", "bdist_wheel"])
290+
subprocess.run([sys.executable, "setup.py", "sdist"])
290291
os.chdir(current_dir)
291292
return f"{tmpdir}/dist"
292293

tests/test_unit.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,9 @@ def test_collect_setup_entries() -> None:
8181
"__init__.pyi",
8282
"a.pyi",
8383
"b.pyi",
84-
"c/__init__.pyi",
85-
"c/d.pyi",
86-
"c/e.pyi",
84+
os.path.join("c", "__init__.pyi"),
85+
os.path.join("c", "d.pyi"),
86+
os.path.join("c", "e.pyi"),
8787
"METADATA.toml",
8888
]
8989
}
@@ -93,7 +93,7 @@ def test_collect_setup_entries() -> None:
9393
assert entries == (
9494
{
9595
"nspkg-stubs": [
96-
"innerpkg/__init__.pyi",
96+
os.path.join("innerpkg", "__init__.pyi"),
9797
"METADATA.toml",
9898
]
9999
}

0 commit comments

Comments
 (0)