MCPcopy Create free account
hub / github.com/python/cpython / test_py_shebang_short_argv0

Method test_py_shebang_short_argv0

Lib/test/test_launcher.py:628–635  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

626 data["stdout"].strip())
627
628 def test_py_shebang_short_argv0(self):
629 with self.py_ini(TEST_PY_DEFAULTS):
630 with self.script("#! /usr/bin/python -prearg") as script:
631 # Override argv to only pass "py.exe" as the command
632 data = self.run_py([script, "-postarg"], argv=f'"py.exe" "{script}" -postarg')
633 self.assertEqual("PythonTestSuite", data["SearchInfo.company"])
634 self.assertEqual("3.100", data["SearchInfo.tag"])
635 self.assertEqual(f'X.Y.exe -prearg "{script}" -postarg', data["stdout"].strip())
636
637 def test_py_shebang_valid_bom(self):
638 with self.py_ini(TEST_PY_DEFAULTS):

Callers

nothing calls this directly

Calls 5

py_iniMethod · 0.80
run_pyMethod · 0.80
scriptMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected