File tree Expand file tree Collapse file tree 2 files changed +24
-4
lines changed
Expand file tree Collapse file tree 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,22 @@ def gfunc():
9999
100100 global_not_found = "name 'gfunc' is not defined"
101101
102- if (3 , 11 ) <= sys .version_info [:2 ]:
102+ if (3 , 13 ) <= sys .version_info [:2 ]:
103+ expected = (
104+ "Traceback (most recent call last):\n File "
105+ + green ('"<input>"' )
106+ + ", line "
107+ + bold (magenta ("1" ))
108+ + ", in "
109+ + cyan ("<module>" )
110+ + "\n gfunc()"
111+ + "\n ^^^^^\n "
112+ + bold (red ("NameError" ))
113+ + ": "
114+ + cyan (global_not_found )
115+ + "\n "
116+ )
117+ elif (3 , 11 ) <= sys .version_info [:2 ]:
103118 expected = (
104119 "Traceback (most recent call last):\n File "
105120 + green ('"<input>"' )
Original file line number Diff line number Diff line change @@ -332,9 +332,14 @@ def test_current_function_cpython(self):
332332 self .assert_get_source_error_for_current_function (
333333 collections .defaultdict .copy , "No source code found for INPUTLINE"
334334 )
335- self .assert_get_source_error_for_current_function (
336- collections .defaultdict , "could not find class definition"
337- )
335+ if sys .version_info [:2 ] >= (3 , 13 ):
336+ self .assert_get_source_error_for_current_function (
337+ collections .defaultdict , "source code not available"
338+ )
339+ else :
340+ self .assert_get_source_error_for_current_function (
341+ collections .defaultdict , "could not find class definition"
342+ )
338343
339344 def test_current_line (self ):
340345 self .repl .interp .locals ["a" ] = socket .socket
You can’t perform that action at this time.
0 commit comments