Skip to content

Commit 4697efb

Browse files
committed
Fix test with recent versions of Python 3.13 and 3.14
1 parent 3dd1034 commit 4697efb

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

bpython/test/test_interpreter.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,24 @@ def gfunc():
5050

5151
global_not_found = "name 'gfunc' is not defined"
5252

53-
if (3, 13) <= sys.version_info[:2] or pypy:
53+
if (
54+
sys.version_info[:2] == (3, 13)
55+
and sys.version_info[:3] >= (3, 13, 12)
56+
) or sys.version_info[:3] >= (3, 14, 3):
57+
expected = expected = (
58+
"Traceback (most recent call last):\n File "
59+
+ green('"<input>"')
60+
+ ", line "
61+
+ bold(magenta("1"))
62+
+ ", in "
63+
+ cyan("<module>")
64+
+ "\n"
65+
+ bold(red("NameError"))
66+
+ ": "
67+
+ cyan(global_not_found)
68+
+ "\n"
69+
)
70+
elif (3, 13) <= sys.version_info[:2] or pypy:
5471
expected = (
5572
"Traceback (most recent call last):\n File "
5673
+ green('"<input>"')

0 commit comments

Comments
 (0)