Skip to content

Commit c83eae2

Browse files
committed
have test check shebang for bat
1 parent cbae47e commit c83eae2

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

tests/venv_site_packages_libs/whl_scripts_runnable_test.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ def test_pythonw_script(self):
7070

7171
is_windows = sys.platform == "win32"
7272
if is_windows:
73+
# On Windows, the shebang is replaced with a batch wrapper that
74+
# invokes the interpreter.
7375
self.assertIn("pythonw.exe", first_line)
76+
self.assertTrue(
77+
first_line.startswith("@setlocal") or first_line.startswith("@echo off"),
78+
f"Expected Windows batch wrapper, got {first_line}",
79+
)
7480
else:
7581
self.assertTrue(
7682
first_line.startswith("#!/bin/sh"),

0 commit comments

Comments
 (0)