Skip to content

Commit 54d3acf

Browse files
committed
skip venv zipapp test on windows, venv not supported on windows yet
1 parent 69f13a4 commit 54d3acf

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

tests/py_zipapp/BUILD.bazel

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ py_binary(
1717
"//python/config_settings:venvs_site_packages": "yes",
1818
},
1919
main = "main.py",
20-
##target_compatible_with = NOT_WINDOWS,
20+
target_compatible_with = NOT_WINDOWS,
2121
deps = [":some_dep"],
2222
)
2323

2424
py_zipapp_binary(
2525
name = "venv_zipapp",
2626
binary = ":venv_bin",
27-
##target_compatible_with = NOT_WINDOWS,
27+
target_compatible_with = NOT_WINDOWS,
2828
)
2929

3030
py_test(
@@ -33,10 +33,9 @@ py_test(
3333
data = [":venv_zipapp"],
3434
env = {
3535
"BZLMOD_ENABLED": str(int(BZLMOD_ENABLED)),
36-
# todo: for windows, the output is (launcher.exe, zipapp.pyz)
3736
"TEST_ZIPAPP": "$(location :venv_zipapp)",
3837
},
39-
##target_compatible_with = NOT_WINDOWS,
38+
target_compatible_with = NOT_WINDOWS,
4039
)
4140

4241
py_binary(

tests/py_zipapp/venv_zipapp_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ def _is_bzlmod_enabled(self):
6060

6161
@contextlib.contextmanager
6262
def _open_zipapp(self, path):
63-
# On windows, the main output is the launcher .exe file, and the zip
64-
# file is a sibling file.
6563
zf = None
6664
try:
6765
try:
6866
zf = zipfile.ZipFile(path, "r")
6967
except zipfile.BadZipFile:
68+
# On windows, the main output is the launcher .exe file, and the
69+
# zip file is a sibling file.
7070
path = path.replace(".exe", ".zip")
7171
zf = zipfile.ZipFile(path, "r")
7272
if zf:

0 commit comments

Comments
 (0)