From 6ccfeb17d559898d8df30135ea0436bd189adc36 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 12 Jul 2022 12:15:17 -0400 Subject: [PATCH] Add back prompt expect via flag --- tests/test_debugger.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test_debugger.py b/tests/test_debugger.py index 5931415..ab901b0 100644 --- a/tests/test_debugger.py +++ b/tests/test_debugger.py @@ -150,6 +150,7 @@ def do_ctlc( child, count: int = 3, delay: float = 0.1, + expect_prompt: bool = True, patt: Optional[str] = None, ) -> None: @@ -161,13 +162,14 @@ def do_ctlc( # TODO: figure out why this makes CI fail.. # if you run this test manually it works just fine.. - # time.sleep(delay) - # child.expect(r"\(Pdb\+\+\)") - # time.sleep(delay) + if expect_prompt: + time.sleep(delay) + child.expect(r"\(Pdb\+\+\)") + time.sleep(delay) + before = str(child.before.decode()) if patt: # should see the last line on console - before = str(child.before.decode()) assert patt in before @@ -238,8 +240,8 @@ def test_subactor_error( # creating actor child.sendline('continue') child.expect(r"\(Pdb\+\+\)") - before = str(child.before.decode()) + # root actor gets debugger engaged assert "Attaching to pdb in crashed actor: ('root'" in before # error is a remote error propagated from the subactor