(self)
| 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 |
| 678 | exe = Path("arbitrary-exe-name.exe").absolute() |
| 679 | exe.touch() |
| 680 | self.addCleanup(exe.unlink) |
| 681 | with self.py_ini(TEST_PY_DEFAULTS): |
| 682 | with self.script(f"#! /usr/bin/env {exe.name} -prearg") as script: |
| 683 | data = self.run_py( |
| 684 | [script, "-postarg"], |
| 685 | env={"PATH": f"{exe.parent};{os.getenv('PATH')}"}, |
| 686 | ) |
| 687 | self.assertEqual(f"{quote(exe)} -prearg {quote(script)} -postarg", |
| 688 | data["stdout"].strip()) |
| 689 | |
| 690 | def test_recursive_search_path(self): |
| 691 | stem = self.get_py_exe().stem |
nothing calls this directly
no test coverage detected