ref: Print optional error message on editor process error
Editor function takes an optional io object which is used to print an error output if the subprocess errors.
This commit is contained in:
parent
762b4a288f
commit
28c551e157
2 changed files with 15 additions and 3 deletions
|
|
@ -9,3 +9,11 @@ def test_open_editor_escapes_shell():
|
|||
with patch("subprocess.run") as run_mock:
|
||||
open_editor(Path("my note$1.txt"), "vim")
|
||||
run_mock.assert_called_once_with(["vim", "my note$1.txt"], check=True)
|
||||
|
||||
|
||||
#
|
||||
# def test_add_annotation_saves_task():
|
||||
# task = Mock()
|
||||
# add_annotation(task, "hello")
|
||||
# task.add_annotation.assert_called_once_with("hello")
|
||||
# task.save.assert_called_once()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue