MCPcopy Index your code
hub / github.com/python/cpython / test_py2_shebang

Method test_py2_shebang

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

Source from the content-addressed store, hash-verified

581 self.assertEqual(f"X.Y.exe -prearg {quote(script)} -postarg", data["stdout"].strip())
582
583 def test_py2_shebang(self):
584 with self.py_ini(TEST_PY_DEFAULTS):
585 with self.script("#! /usr/bin/python2 -prearg") as script:
586 data = self.run_py([script, "-postarg"])
587 self.assertEqual("PythonTestSuite", data["SearchInfo.company"])
588 self.assertEqual("3.100-32", data["SearchInfo.tag"])
589 self.assertEqual(f"X.Y-32.exe -prearg {quote(script)} -postarg",
590 data["stdout"].strip())
591
592 def test_py3_shebang(self):
593 with self.py_ini(TEST_PY_DEFAULTS):

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected