Skip to content

Commit

Permalink
pythongh-119070: Update test_shebang_executable_extension to always u…
Browse files Browse the repository at this point in the history
…se non-installed version (pythonGH-119846)
  • Loading branch information
zooba authored Jun 4, 2024
1 parent a8f1152 commit 5c48eb0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/test/test_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,9 @@ def test_shebang_command_in_venv(self):
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)

0 comments on commit 5c48eb0

Please sign in to comment.