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

Method test_python_shebang

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

Source from the content-addressed store, hash-verified

566 self.assertEqual(f"X.Y.exe -prearg {quote(script)} -postarg", data["stdout"].strip())
567
568 def test_python_shebang(self):
569 with self.py_ini(TEST_PY_DEFAULTS):
570 with self.script("#! python -prearg") as script:
571 data = self.run_py([script, "-postarg"])
572 self.assertEqual("PythonTestSuite", data["SearchInfo.company"])
573 self.assertEqual("3.100", data["SearchInfo.tag"])
574 self.assertEqual(f"X.Y.exe -prearg {quote(script)} -postarg", data["stdout"].strip())
575
576 def test_py2_shebang(self):
577 with self.py_ini(TEST_PY_DEFAULTS):

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected