@@ -2147,22 +2147,19 @@ def test_py_config_isoloated_per_interpreter(self):
21472147 # This test could verify ANY config value, it just happens to have been
21482148 # written around the time of int_max_str_digits. Refactoring is okay.
21492149 code = """if 1:
2150- import sys, _testinternalcapi
2150+ import sys, _testcapi
21512151
21522152 # Any config value would do, this happens to be the one being
21532153 # double checked at the time this test was written.
2154- config = _testinternalcapi.get_config()
2155- config['int_max_str_digits'] = 55555
2156- config['parse_argv'] = 0
2157- _testinternalcapi.set_config(config)
2158- sub_value = _testinternalcapi.get_config()['int_max_str_digits']
2154+ _testcapi.config_set('int_max_str_digits', 55555)
2155+ sub_value = _testcapi.config_get('int_max_str_digits')
21592156 assert sub_value == 55555, sub_value
21602157 """
2161- before_config = _testinternalcapi . get_config ( )
2162- assert before_config [ 'int_max_str_digits' ] != 55555
2158+ before_config = _testcapi . config_get ( 'int_max_str_digits' )
2159+ assert before_config != 55555
21632160 self .assertEqual (support .run_in_subinterp (code ), 0 ,
21642161 'subinterp code failure, check stderr.' )
2165- after_config = _testinternalcapi . get_config ( )
2162+ after_config = _testcapi . config_get ( 'int_max_str_digits' )
21662163 self .assertIsNot (
21672164 before_config , after_config ,
21682165 "Expected get_config() to return a new dict on each call" )
0 commit comments