@@ -717,18 +717,18 @@ def test_created_with_capi(self):
717
717
with self .subTest ('running __main__ (from self)' ):
718
718
with self .interpreter_from_capi () as interpid :
719
719
with self .assertRaisesRegex (ExecutionFailed ,
720
- 'InterpreterError.*unrecognized ' ):
720
+ 'InterpreterError.*not supported ' ):
721
721
self .run_from_capi (interpid , script , main = True )
722
722
723
723
with self .subTest ('running, but not __main__ (from self)' ):
724
724
with self .assertRaisesRegex (ExecutionFailed ,
725
- 'InterpreterError.*unrecognized ' ):
725
+ 'InterpreterError.*not supported ' ):
726
726
self .run_temp_from_capi (script )
727
727
728
728
with self .subTest ('running __main__ (from other)' ):
729
729
with self .interpreter_obj_from_capi () as (interp , interpid ):
730
730
with self .running_from_capi (interpid , main = True ):
731
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
731
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
732
732
interp .close ()
733
733
# Make sure it wssn't closed.
734
734
self .assertTrue (
@@ -741,15 +741,15 @@ def test_created_with_capi(self):
741
741
with self .subTest ('running, but not __main__ (from other)' ):
742
742
with self .interpreter_obj_from_capi () as (interp , interpid ):
743
743
with self .running_from_capi (interpid , main = False ):
744
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
744
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
745
745
interp .close ()
746
746
# Make sure it wssn't closed.
747
747
self .assertTrue (
748
748
self .interp_exists (interpid ))
749
749
750
750
with self .subTest ('not running (from other)' ):
751
751
with self .interpreter_obj_from_capi () as (interp , interpid ):
752
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
752
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
753
753
interp .close ()
754
754
self .assertTrue (
755
755
self .interp_exists (interpid ))
@@ -920,7 +920,7 @@ def test_running(self):
920
920
@requires_test_modules
921
921
def test_created_with_capi (self ):
922
922
with self .interpreter_obj_from_capi () as (interp , interpid ):
923
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
923
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
924
924
interp .prepare_main ({'spam' : True })
925
925
with self .assertRaisesRegex (ExecutionFailed , 'NameError' ):
926
926
self .run_from_capi (interpid , 'assert spam is True' )
@@ -1098,7 +1098,7 @@ def task():
1098
1098
1099
1099
def test_created_with_capi (self ):
1100
1100
with self .interpreter_obj_from_capi () as (interp , _ ):
1101
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
1101
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
1102
1102
interp .exec ('raise Exception("it worked!")' )
1103
1103
1104
1104
def test_list_comprehension (self ):
@@ -2271,7 +2271,7 @@ def test_destroy(self):
2271
2271
2272
2272
with self .subTest ('from C-API' ):
2273
2273
interpid = _testinternalcapi .create_interpreter ()
2274
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
2274
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
2275
2275
_interpreters .destroy (interpid , restrict = True )
2276
2276
self .assertTrue (
2277
2277
self .interp_exists (interpid ))
@@ -2315,7 +2315,7 @@ def test_get_config(self):
2315
2315
with self .subTest ('from C-API' ):
2316
2316
orig = _interpreters .new_config ('isolated' )
2317
2317
with self .interpreter_from_capi (orig ) as interpid :
2318
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
2318
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
2319
2319
_interpreters .get_config (interpid , restrict = True )
2320
2320
config = _interpreters .get_config (interpid )
2321
2321
self .assert_ns_equal (config , orig )
@@ -2376,7 +2376,7 @@ def test_contextvars_missing(self):
2376
2376
2377
2377
def test_is_running (self ):
2378
2378
def check (interpid , expected ):
2379
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
2379
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
2380
2380
_interpreters .is_running (interpid , restrict = True )
2381
2381
running = _interpreters .is_running (interpid )
2382
2382
self .assertIs (running , expected )
@@ -2442,7 +2442,7 @@ def test_exec(self):
2442
2442
2443
2443
with self .subTest ('from C-API' ):
2444
2444
with self .interpreter_from_capi () as interpid :
2445
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
2445
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
2446
2446
_interpreters .exec (interpid , 'raise Exception("it worked!")' ,
2447
2447
restrict = True )
2448
2448
exc = _interpreters .exec (interpid , 'raise Exception("it worked!")' )
@@ -2521,7 +2521,7 @@ def test_set___main___attrs(self):
2521
2521
2522
2522
with self .subTest ('from C-API' ):
2523
2523
with self .interpreter_from_capi () as interpid :
2524
- with self .assertRaisesRegex (InterpreterError , 'unrecognized ' ):
2524
+ with self .assertRaisesRegex (InterpreterError , 'not supported ' ):
2525
2525
_interpreters .set___main___attrs (interpid , {'spam' : True },
2526
2526
restrict = True )
2527
2527
_interpreters .set___main___attrs (interpid , {'spam' : True })
0 commit comments