From 5c48eb0cc6c3e84aafda0a734a05ecec14fc0ccf Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Tue, 4 Jun 2024 09:17:45 +0100 Subject: [PATCH] gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846) --- Lib/test/test_launcher.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Lib/test/test_launcher.py b/Lib/test/test_launcher.py index 6d358ac6f16..58baae25df3 100644 --- a/Lib/test/test_launcher.py +++ b/Lib/test/test_launcher.py @@ -766,9 +766,9 @@ class TestLauncher(unittest.TestCase, RunPyMixin): self.assertEqual(data["stdout"].strip(), f"{quote(exe)} arg1 {quote(script)}") def test_shebang_executable_extension(self): - with self.script('#! /usr/bin/env python3.12') as script: - data = self.run_py([script]) - expect = "# Search PATH for python3.12.exe" + with self.script('#! /usr/bin/env python3.99') as script: + data = self.run_py([script], expect_returncode=103) + expect = "# Search PATH for python3.99.exe" actual = [line.strip() for line in data["stderr"].splitlines() if line.startswith("# Search PATH")] self.assertEqual([expect], actual)