Handle pexpect's internal timeout

fix_debug_tests_in_ci_again
Tyler Goodlet 2020-12-18 17:57:44 -05:00
parent 1701493087
commit a95488ad2f
1 changed files with 6 additions and 8 deletions

View File

@ -395,15 +395,13 @@ def test_root_nursery_cancels_before_child_releases_tty_lock(spawn, start_method
time.sleep(0.5) time.sleep(0.5)
try: try:
child.expect(r"\(Pdb\+\+\)") child.expect(r"\(Pdb\+\+\)")
except TimeoutError:
if start_method == 'mp':
# appears to be some little races that might result in the
# last couple acts tearing down early
break
else:
raise
except pexpect.exceptions.EOF: except (
pexpect.exceptions.EOF,
pexpect.exceptions.TIMEOUT,
):
# races all over..
print(f"Failed early on {i}?") print(f"Failed early on {i}?")
before = str(child.before.decode()) before = str(child.before.decode())