mirror of https://github.com/python/cpython
[3.13] gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846) (#GH-120015)
gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846)
(cherry picked from commit 5c48eb0cc6
)
Co-authored-by: Steve Dower <steve.dower@python.org>
This commit is contained in:
parent
6e67fd5bea
commit
6ce2810f36
|
@ -766,9 +766,9 @@ class TestLauncher(unittest.TestCase, RunPyMixin):
|
||||||
self.assertEqual(data["stdout"].strip(), f"{quote(exe)} arg1 {quote(script)}")
|
self.assertEqual(data["stdout"].strip(), f"{quote(exe)} arg1 {quote(script)}")
|
||||||
|
|
||||||
def test_shebang_executable_extension(self):
|
def test_shebang_executable_extension(self):
|
||||||
with self.script('#! /usr/bin/env python3.12') as script:
|
with self.script('#! /usr/bin/env python3.99') as script:
|
||||||
data = self.run_py([script])
|
data = self.run_py([script], expect_returncode=103)
|
||||||
expect = "# Search PATH for python3.12.exe"
|
expect = "# Search PATH for python3.99.exe"
|
||||||
actual = [line.strip() for line in data["stderr"].splitlines()
|
actual = [line.strip() for line in data["stderr"].splitlines()
|
||||||
if line.startswith("# Search PATH")]
|
if line.startswith("# Search PATH")]
|
||||||
self.assertEqual([expect], actual)
|
self.assertEqual([expect], actual)
|
||||||
|
|
Loading…
Reference in New Issue