Skip to content

Commit 0d9cfca

Browse files
committed
Try to fix transient in test_repl
1 parent ed90d69 commit 0d9cfca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

graalpython/com.oracle.graal.python.test/src/runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def from_test_case(cls, test_file: Path, test: unittest.TestCase):
149149
test_id = f'<{action}>'
150150
else:
151151
test_id = f'{class_name}.<{action}>'
152-
elif type(test).id is not unittest.TestCase.id:
152+
elif type(test).id is not unittest.TestCase.id and type(test) is not unittest.FunctionTestCase:
153153
# Qualify doctests so that we know what they are
154154
test_id = f'{type(test).__qualname__}.{test_id}'
155155
return cls(test_file, test_id)

graalpython/com.oracle.graal.python.test/src/tests/test_repl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ def validate_repl(stdin, python_args=(), ignore_preamble=True):
8282
rlist, _, _ = select.select([pty_parent], [], [], 60)
8383
assert pty_parent in rlist, f"Timed out waiting for REPL output. Output: {whole_out}{out}"
8484
out += os.read(pty_parent, 1024).decode('utf-8')
85-
out = out.replace('\r\n', '\n')
8685
out = re.sub(r'\x1b\[(?:\?2004[hl]|\d+[A-G])', '', out)
86+
out = out.replace('\r\n', '\n')
8787
if out == '>>> ' or out.endswith(('\n>>> ', '\n... ')):
8888
prompt = out[:3]
8989
actual = out[:-5]

0 commit comments

Comments
 (0)