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

Method test_py2_shebang_nl

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

Source from the content-addressed store, hash-verified

608 data["stdout"].strip())
609
610 def test_py2_shebang_nl(self):
611 with self.py_ini(TEST_PY_DEFAULTS):
612 with self.script("#! /usr/bin/python2 -prearg\n") as script:
613 data = self.run_py([script, "-postarg"])
614 self.assertEqual("PythonTestSuite", data["SearchInfo.company"])
615 self.assertEqual("3.100-32", data["SearchInfo.tag"])
616 self.assertEqual(f"X.Y-32.exe -prearg {quote(script)} -postarg",
617 data["stdout"].strip())
618
619 def test_py3_shebang_nl(self):
620 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