~nhoad/aiomanhole

7da80473a3408554f84f5e718ea316dc9be9cdc3 — Nathan Hoad 9 months ago 32fc293
Fixes #4.
1 files changed, 2 insertions(+), 1 deletions(-)

M test_aiomanhole.py
M test_aiomanhole.py => test_aiomanhole.py +2 -1
@@ 201,7 201,8 @@ class TestInteractiveInterpreter:
    @pytest.mark.parametrize('partial', [True, False])
    def test_write_prompt(self, interpreter, loop, partial):
        with mock.patch.object(interpreter.compiler, 'is_partial_command', return_value=partial):
            loop.run_until_complete(interpreter.write_prompt())
            with mock.patch('sys.ps1', '>>> ', create=True), mock.patch('sys.ps2', '... ', create=True):
                loop.run_until_complete(interpreter.write_prompt())

        expected_value = b'... ' if partial else b'>>> '
        assert interpreter.writer.buf.getvalue() == expected_value