| 644 | self.assertEqual(f"X.Y.exe -prearg {quote(script)} -postarg", data["stdout"].strip()) |
| 645 | |
| 646 | def test_py_shebang_invalid_bom(self): |
| 647 | with self.py_ini(TEST_PY_DEFAULTS): |
| 648 | content = "#! /usr/bin/python3 -prearg".encode("utf-8") |
| 649 | with self.script(b"\xEF\xAA\xBF" + content) as script: |
| 650 | data = self.run_py([script, "-postarg"]) |
| 651 | self.assertIn("Invalid BOM", data["stderr"]) |
| 652 | self.assertEqual("PythonTestSuite", data["SearchInfo.company"]) |
| 653 | self.assertEqual("3.100", data["SearchInfo.tag"]) |
| 654 | self.assertEqual(f"X.Y.exe {quote(script)} -postarg", data["stdout"].strip()) |
| 655 | |
| 656 | def test_py_handle_64_in_ini(self): |
| 657 | with self.py_ini("\n".join(["[defaults]", "python=3.999-64"])): |