Skip to content

Commit 81e7cd8

Browse files
committed
Fix test with Python 3.8
1 parent 79bc2f3 commit 81e7cd8

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

bpython/test/test_interpreter.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,19 @@ def test_syntaxerror(self):
4040

4141
i.runsource("1.1.1.1")
4242

43-
if pypy:
43+
if sys.version_info[:2] >= (3, 8):
44+
expected = (
45+
" File "
46+
+ green('"<input>"')
47+
+ ", line "
48+
+ bold(magenta("1"))
49+
+ "\n 1.1.1.1\n ^\n"
50+
+ bold(red("SyntaxError"))
51+
+ ": "
52+
+ cyan("invalid syntax")
53+
+ "\n"
54+
)
55+
elif pypy:
4456
expected = (
4557
" File "
4658
+ green('"<input>"')

0 commit comments

Comments
 (0)