8000 [3.12] gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846) by miss-islington · Pull Request #120016 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.12] gh-119070: Update test_shebang_executable_extension to always use non-installed version (GH-119846) #120016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-119070: Update test_shebang_executable_extension to always use non…
…-installed version (GH-119846)

(cherry picked from commit 5c48eb0)

Co-authored-by: Steve Dower <steve.dower@python.org>
  • Loading branch information
zooba authored and miss-islington committed Jun 4, 2024
commit 055035ad4814fd3c638b631e45e185f25efade31
6 changes: 3 additions & 3 deletions Lib/test/test_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,9 @@ def test_literal_shebang_invalid_template(self):
)

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