| 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): |
| 641 | content = "#! /usr/bin/python3 -prearg".encode("utf-8") |
| 642 | with self.script(b"\xEF\xAA\xBF" + content) as script: |
| 643 | data = self.run_py([script, "-postarg"]) |
| 644 | self.assertIn("Invalid BOM", data["stderr"]) |
| 645 | self.assertEqual("PythonTestSuite", data["SearchInfo.company"]) |
| 646 | self.assertEqual("3.100", data["SearchInfo.tag"]) |
| 647 | self.assertEqual(f"X.Y.exe {quote(script)} -postarg", data["stdout"].strip()) |
| 648 | |
| 649 | def test_py_handle_64_in_ini(self): |
| 650 | with self.py_ini("\n".join(["[defaults]", "python=3.999-64"])): |