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

Method test_py_shebang_valid_bom

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

Source from the content-addressed store, hash-verified

628 self.assertEqual(f'X.Y.exe -prearg "{script}" -postarg', data["stdout"].strip())
629
630 def test_py_shebang_valid_bom(self):
631 with self.py_ini(TEST_PY_DEFAULTS):
632 content = "#! /usr/bin/python -prearg".encode("utf-8")
633 with self.script(b"\xEF\xBB\xBF" + content) as script:
634 data = self.run_py([script, "-postarg"])
635 self.assertEqual("PythonTestSuite", data["SearchInfo.company"])
636 self.assertEqual("3.100", data["SearchInfo.tag"])
637 self.assertEqual(f"X.Y.exe -prearg {quote(script)} -postarg", data["stdout"].strip())
638
639 def test_py_shebang_invalid_bom(self):
640 with self.py_ini(TEST_PY_DEFAULTS):

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected