(editor_cmd, filenames, expected_args)
| 509 | ], |
| 510 | ) |
| 511 | def test_editor_path_normalization(editor_cmd, filenames, expected_args): |
| 512 | with patch("subprocess.Popen") as mock_popen: |
| 513 | mock_popen.return_value.wait.return_value = 0 |
| 514 | Editor(editor=editor_cmd).edit_files(filenames) |
| 515 | |
| 516 | mock_popen.assert_called_once() |
| 517 | args = mock_popen.call_args[1].get("args") or mock_popen.call_args[0][0] |
| 518 | assert args == expected_args |
| 519 | assert mock_popen.call_args[1].get("shell") is None |
| 520 | |
| 521 | |
| 522 | @pytest.mark.skipif(not WIN, reason="Windows-specific editor paths") |
nothing calls this directly
no test coverage detected
searching dependent graphs…