@@ -882,7 +882,7 @@ def test_edit_file(base_app, request, monkeypatch):
882
882
# Set a fake editor just to make sure we have one. We aren't really going to call it due to the mock
883
883
base_app .editor = 'fooedit'
884
884
885
- # Mock out the os.system call so we don't actually open an editor
885
+ # Mock out the subprocess.Popen call so we don't actually open an editor
886
886
m = mock .MagicMock (name = 'Popen' )
887
887
monkeypatch .setattr ("subprocess.Popen" , m )
888
888
@@ -936,9 +936,12 @@ def test_base_py_interactive(base_app):
936
936
937
937
938
938
def test_exclude_from_history (base_app , monkeypatch ):
939
- # Mock out the os.system call so we don't actually open an editor
940
- m = mock .MagicMock (name = 'system' )
941
- monkeypatch .setattr ("os.system" , m )
939
+ # Set a fake editor just to make sure we have one. We aren't really going to call it due to the mock
940
+ base_app .editor = 'fooedit'
941
+
942
+ # Mock out the subprocess.Popen call so we don't actually open an editor
943
+ m = mock .MagicMock (name = 'Popen' )
944
+ monkeypatch .setattr ("subprocess.Popen" , m )
942
945
943
946
# Run edit command
944
947
run_cmd (base_app , 'edit' )
@@ -952,6 +955,7 @@ def test_exclude_from_history(base_app, monkeypatch):
952
955
953
956
# Now run a command which isn't excluded from the history
954
957
run_cmd (base_app , 'help' )
958
+
955
959
# And verify we have a history now ...
956
960
out = run_cmd (base_app , 'history' )
957
961
expected = normalize ("""-------------------------[1]
0 commit comments