]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-119070: Update test_shebang_executable_extension to always use non-installe...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 4 Jun 2024 11:27:58 +0000 (13:27 +0200)
committerGitHub <noreply@github.com>
Tue, 4 Jun 2024 11:27:58 +0000 (13:27 +0200)
gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846)
(cherry picked from commit 5c48eb0cc6c3e84aafda0a734a05ecec14fc0ccf)

Lib/test/test_launcher.py

index b701ceb86406b282e429a729c5b2cc472aa72d3b..a60927775a480a903e7e15849d099a11b8e7120c 100644 (file)
@@ -719,9 +719,9 @@ class TestLauncher(unittest.TestCase, RunPyMixin):
         )
 
     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)