(self)
| 661 | self.assertEqual("True", data["SearchInfo.oldStyleTag"]) |
| 662 | |
| 663 | def test_search_path(self): |
| 664 | exe = Path("arbitrary-exe-name.exe").absolute() |
| 665 | exe.touch() |
| 666 | self.addCleanup(exe.unlink) |
| 667 | with self.py_ini(TEST_PY_DEFAULTS): |
| 668 | with self.script(f"#! /usr/bin/env {exe.stem} -prearg") as script: |
| 669 | data = self.run_py( |
| 670 | [script, "-postarg"], |
| 671 | env={"PATH": f"{exe.parent};{os.getenv('PATH')}"}, |
| 672 | ) |
| 673 | self.assertEqual(f"{quote(exe)} -prearg {quote(script)} -postarg", |
| 674 | data["stdout"].strip()) |
| 675 | |
| 676 | def test_search_path_exe(self): |
| 677 | # Leave the .exe on the name to ensure we don't add it a second time |
nothing calls this directly
no test coverage detected