##// END OF EJS Templates
Backport PR #10239: IPython/lib/editorhooks.py: wait for process even if wait=False...
Thomas Kluyver -
Show More
@@ -54,7 +54,7 b' def install_editor(template, wait=False):'
54 if sys.platform.startswith('win'):
54 if sys.platform.startswith('win'):
55 cmd = shlex.split(cmd)
55 cmd = shlex.split(cmd)
56 proc = subprocess.Popen(cmd, shell=True)
56 proc = subprocess.Popen(cmd, shell=True)
57 if wait and proc.wait() != 0:
57 if proc.wait() != 0:
58 raise TryNext()
58 raise TryNext()
59 if wait:
59 if wait:
60 py3compat.input("Press Enter when done editing:")
60 py3compat.input("Press Enter when done editing:")
@@ -18,6 +18,7 b' def test_install_editor():'
18 'args': args,
18 'args': args,
19 'kwargs': kwargs,
19 'kwargs': kwargs,
20 })
20 })
21 return mock.MagicMock(**{'wait.return_value': 0})
21 editorhooks.install_editor('foo -l {line} -f {filename}', wait=False)
22 editorhooks.install_editor('foo -l {line} -f {filename}', wait=False)
22
23
23 with mock.patch('subprocess.Popen', fake_popen):
24 with mock.patch('subprocess.Popen', fake_popen):
General Comments 0
You need to be logged in to leave comments. Login now