MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_py_shebang_short_argv0

Method test_py_shebang_short_argv0

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected