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

Method test_py2_shebang

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

Source from the content-addressed store, hash-verified

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):
578 with self.script("#! /usr/bin/python2 -prearg") as script:
579 data = self.run_py([script, "-postarg"])
580 self.assertEqual("PythonTestSuite", data["SearchInfo.company"])
581 self.assertEqual("3.100-32", data["SearchInfo.tag"])
582 self.assertEqual(f"X.Y-32.exe -prearg {quote(script)} -postarg",
583 data["stdout"].strip())
584
585 def test_py3_shebang(self):
586 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