Drive main() with argv, cwd at tmp_path, and Path.home redirected.
(tmp_path, argv, home)
| 50 | |
| 51 | |
| 52 | def _run(tmp_path, argv, home): |
| 53 | """Drive main() with argv, cwd at tmp_path, and Path.home redirected.""" |
| 54 | old_cwd = Path.cwd() |
| 55 | try: |
| 56 | os.chdir(tmp_path) |
| 57 | with patch.object(sys, "argv", ["graphify", *argv]): |
| 58 | with patch("graphify.__main__.Path.home", return_value=home): |
| 59 | mainmod.main() |
| 60 | finally: |
| 61 | os.chdir(old_cwd) |
| 62 | |
| 63 | |
| 64 | @pytest.mark.parametrize("platform_arg", ["agents", "skills"]) |
no outgoing calls
no test coverage detected