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

Function mock_input

IPython/testing/tools.py:443–447  ·  view source on GitHub ↗
(prompt='')

Source from the content-addressed store, hash-verified

441 """
442 it = iter(inputs)
443 def mock_input(prompt=''):
444 try:
445 return next(it)
446 except StopIteration:
447 raise EOFError('No more inputs given')
448
449 return patch('builtins.input', mock_input)
450

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected