File tree 2 files changed +24
-4
lines changed 2 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,22 @@ def gfunc():
99
99
100
100
global_not_found = "name 'gfunc' is not defined"
101
101
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 ]:
103
118
expected = (
104
119
"Traceback (most recent call last):\n File "
105
120
+ green ('"<input>"' )
Original file line number Diff line number Diff line change @@ -332,9 +332,14 @@ def test_current_function_cpython(self):
332
332
self .assert_get_source_error_for_current_function (
333
333
collections .defaultdict .copy , "No source code found for INPUTLINE"
334
334
)
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
+ )
338
343
339
344
def test_current_line (self ):
340
345
self .repl .interp .locals ["a" ] = socket .socket
You can’t perform that action at this time.
0 commit comments