@@ -2137,6 +2137,7 @@ def test_py_config_isoloated_per_interpreter(self):
21372137 # test fails, assume that the environment in this process may
21382138 # be altered and suspect.
21392139
2140+ @requires_subinterpreters
21402141 @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
21412142 def test_configured_settings (self ):
21422143 """
@@ -2215,17 +2216,16 @@ def test_configured_settings(self):
22152216 self .assertEqual (settings , expected )
22162217
22172218 # expected to fail
2218- if _interpreters is not None :
2219- for config in expected_to_fail :
2220- kwargs = dict (zip (kwlist , config ))
2221- with self .subTest (config ):
2222- script = textwrap .dedent (f'''
2223- import _testinternalcapi
2224- _testinternalcapi.get_interp_settings()
2225- raise NotImplementedError('unreachable')
2226- ''' )
2227- with self .assertRaises (_interpreters .InterpreterError ):
2228- support .run_in_subinterp_with_config (script , ** kwargs )
2219+ for config in expected_to_fail :
2220+ kwargs = dict (zip (kwlist , config ))
2221+ with self .subTest (config ):
2222+ script = textwrap .dedent (f'''
2223+ import _testinternalcapi
2224+ _testinternalcapi.get_interp_settings()
2225+ raise NotImplementedError('unreachable')
2226+ ''' )
2227+ with self .assertRaises (_interpreters .InterpreterError ):
2228+ support .run_in_subinterp_with_config (script , ** kwargs )
22292229
22302230 @unittest .skipIf (_testsinglephase is None , "test requires _testsinglephase module" )
22312231 @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
0 commit comments