Windows-specific tests: verify ``Popen`` receives unquoted paths that ``subprocess.list2cmdline`` can re-quote for ``CreateProcess``.
(editor_cmd, expected_cmd)
| 536 | ], |
| 537 | ) |
| 538 | def test_editor_windows_path_normalization(editor_cmd, expected_cmd): |
| 539 | """Windows-specific tests: verify ``Popen`` receives unquoted paths that |
| 540 | ``subprocess.list2cmdline`` can re-quote for ``CreateProcess``.""" |
| 541 | with patch("subprocess.Popen") as mock_popen: |
| 542 | mock_popen.return_value.wait.return_value = 0 |
| 543 | Editor(editor=editor_cmd).edit_files(["f.txt"]) |
| 544 | |
| 545 | args = mock_popen.call_args[1].get("args") or mock_popen.call_args[0][0] |
| 546 | assert args == expected_cmd + ["f.txt"] |
| 547 | assert mock_popen.call_args[1].get("shell") is None |
| 548 | |
| 549 | |
| 550 | def test_editor_env_passed_through(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…