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

Method test_py3_shebang

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

Source from the content-addressed store, hash-verified

590 data["stdout"].strip())
591
592 def test_py3_shebang(self):
593 with self.py_ini(TEST_PY_DEFAULTS):
594 with self.script("#! /usr/bin/python3 -prearg") as script:
595 data = self.run_py([script, "-postarg"])
596 self.assertEqual("PythonTestSuite", data["SearchInfo.company"])
597 self.assertEqual("3.100-arm64", data["SearchInfo.tag"])
598 self.assertEqual(f"X.Y-arm64.exe -X fake_arg_for_test -prearg {quote(script)} -postarg",
599 data["stdout"].strip())
600
601 def test_py_shebang_nl(self):
602 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