Skip to content

Commit ac4c326

Browse files
committed
skip pythonw test on bazel 7
1 parent c83eae2 commit ac4c326

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/venv_site_packages_libs/whl_scripts_runnable_test.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
import unittest
66
from pathlib import Path
77

8+
BAZEL_VERSION = os.environ.get("BAZEL_VERSION")
9+
IS_BAZEL_7 = BAZEL_VERSION and BAZEL_VERSION.startswith("7")
10+
811

912
class WhlScriptsRunnableTest(unittest.TestCase):
1013
maxDiff = None
@@ -61,6 +64,7 @@ def test_entry_point_is_runnable(self):
6164
script_executable = output[-1].strip()
6265
self.assertEqual(script_executable, sys.executable)
6366

67+
@unittest.skipIf(IS_BAZEL_7, "bazel 8.5 and lower uses wheel.py, which rewrites #!pythonw to #!python")
6468
def test_pythonw_script(self):
6569
script_path = self._get_script_path("whl_with_data1_pythonw")
6670
self.assertTrue(script_path.exists(), f"Script not found at {script_path}")

0 commit comments

Comments
 (0)