Skip to content

Commit

Permalink
add test timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
KotlinIsland committed Dec 10, 2022
1 parent 1046a61 commit e758e08
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions mypyc/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import subprocess
import sys
import time
from time import sleep
from typing import Any, Iterator, cast

from mypy import build
Expand Down Expand Up @@ -313,16 +312,8 @@ def run_case_step(self, testcase: DataDrivenTestCase, incremental_step: int) ->
stderr=subprocess.STDOUT,
env=env,
)
try:
proc.wait(timeout=0)
except subprocess.TimeoutExpired:
print("Timed out")
while True:
c = proc.stdout.read(1)
if c == b"":
break
print(c.decode(), end='')
raise
if sys.version_info() >= (3, 12):
proc.wait(timeout=30)
output = proc.communicate()[0].decode("utf8")
outlines = output.splitlines()

Expand Down

0 comments on commit e758e08

Please sign in to comment.