MCPcopy Create free account
hub / github.com/ipython/ipython / fake_popen

Function fake_popen

IPython/lib/tests/test_editorhooks.py:12–17  ·  view source on GitHub ↗
(*args, **kwargs)

Source from the content-addressed store, hash-verified

10def test_install_editor():
11 called = []
12 def fake_popen(*args, **kwargs):
13 called.append({
14 'args': args,
15 'kwargs': kwargs,
16 })
17 return mock.MagicMock(**{'wait.return_value': 0})
18 editorhooks.install_editor('foo -l {line} -f {filename}', wait=False)
19
20 with mock.patch('subprocess.Popen', fake_popen):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected