forked from goodboy/tractor
1
0
Fork 0

Use `pytest-timeout` plug to try and prevent CI hang

sigintsaviour_citesthackin
Tyler Goodlet 2022-07-29 11:11:54 -04:00
parent 61af2dc5aa
commit a6f5b9396a
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
pytest pytest
pytest-trio pytest-trio
pytest-timeout
pdbpp pdbpp
mypy<0.920 mypy<0.920
trio_typing<0.7.0 trio_typing<0.7.0

View File

@ -683,6 +683,7 @@ def test_multi_nested_subactors_error_through_nurseries(
assert "NameError" in before assert "NameError" in before
@pytest.mark.timeout(15)
def test_root_nursery_cancels_before_child_releases_tty_lock( def test_root_nursery_cancels_before_child_releases_tty_lock(
spawn, spawn,
start_method, start_method,
@ -734,6 +735,7 @@ def test_root_nursery_cancels_before_child_releases_tty_lock(
do_ctlc(child) do_ctlc(child)
child.sendline('c') child.sendline('c')
time.sleep(0.1)
while True: while True:
try: try:
@ -741,6 +743,7 @@ def test_root_nursery_cancels_before_child_releases_tty_lock(
break break
except pexpect.exceptions.TIMEOUT: except pexpect.exceptions.TIMEOUT:
child.sendline('c') child.sendline('c')
time.sleep(0.1)
print('child was able to grab tty lock again?') print('child was able to grab tty lock again?')
if not timed_out_early: if not timed_out_early: