From f173012fea121bb1af454f84dfadf64e7c1684e9 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Sat, 31 Jul 2021 15:01:26 -0400 Subject: [PATCH] Handle repeat child tty-acquires race --- tests/test_debugger.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/test_debugger.py b/tests/test_debugger.py index e58db41..277663c 100644 --- a/tests/test_debugger.py +++ b/tests/test_debugger.py @@ -497,7 +497,12 @@ def test_root_nursery_cancels_before_child_releases_tty_lock( child.sendline('c') - child.expect(pexpect.EOF) + while True: + try: + child.expect(pexpect.EOF) + break + except pexpect.exceptions.TIMEOUT: + print('child was ablel to grab tty lock again?') if not timed_out_early: