From 48f6d514ef8a59739235182e2c66cc60de9fa5e8 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 12 Dec 2022 14:05:32 -0500 Subject: [PATCH] Handle earlier name error crash in debug test --- tests/test_debugger.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/tests/test_debugger.py b/tests/test_debugger.py index 8704bb1..dd5ab46 100644 --- a/tests/test_debugger.py +++ b/tests/test_debugger.py @@ -634,18 +634,23 @@ def test_multi_daemon_subactors( # expect another breakpoint actor entry child.sendline('c') child.expect(r"\(Pdb\+\+\)") - assert_before(child, [bp_forever_msg]) - if ctlc: - do_ctlc(child) + try: + assert_before(child, [bp_forever_msg]) + except AssertionError: + assert_before(child, [name_error_msg]) - # should crash with the 2nd name error (simulates - # a retry) and then the root eventually (boxed) errors - # after 1 or more further bp actor entries. + else: + if ctlc: + do_ctlc(child) - child.sendline('c') - child.expect(r"\(Pdb\+\+\)") - assert_before(child, [name_error_msg]) + # should crash with the 2nd name error (simulates + # a retry) and then the root eventually (boxed) errors + # after 1 or more further bp actor entries. + + child.sendline('c') + child.expect(r"\(Pdb\+\+\)") + assert_before(child, [name_error_msg]) # wait for final error in root # where it crashs with boxed error @@ -660,10 +665,6 @@ def test_multi_daemon_subactors( except AssertionError: break - # child.sendline('c') - # assert_before( - - # child.sendline('c') assert_before( child, [