I'm using a mock PipeInput with .send_text to simulate user input. Recently, I've switched to multi-line inputs which can be terminated by either Meta+Enter or Esc then Enter. What string should I pass to .send_text to replicate that?
But the program still hangs when prompt() is called
Fixture created like this:
@pytest.fixture
def mock_input():
with create_pipe_input() as pipe_input:
with create_app_session(input=pipe_input, output=DummyOutput()):
yield pipe_input
I'm using a mock
PipeInput
with.send_text
to simulate user input. Recently, I've switched to multi-line inputs which can be terminated by either Meta+Enter orEsc
thenEnter
. What string should I pass to.send_text
to replicate that?I've tried the ASCII code for
Esc
:But the program still hangs when
prompt()
is calledFixture created like this:
Called like in this in code under test: