}
+static int test_import_in_subinterpreters(void)
+{
+ _testembed_Py_InitializeFromConfig();
+ PyThreadState_Swap(Py_NewInterpreter());
+ return PyRun_SimpleString("import readline"); // gh-124160
+}
+
+
/*****************************************************
* Test repeated initialisation and subinterpreters
*****************************************************/
{"test_repeated_init_exec", test_repeated_init_exec},
{"test_repeated_simple_init", test_repeated_simple_init},
{"test_forced_io_encoding", test_forced_io_encoding},
+ {"test_import_in_subinterpreters", test_import_in_subinterpreters},
{"test_repeated_init_and_subinterpreters", test_repeated_init_and_subinterpreters},
{"test_repeated_init_and_inittab", test_repeated_init_and_inittab},
{"test_pre_initialization_api", test_pre_initialization_api},
singlephase.m_init = p0;
}
cached = update_global_state_for_extension(
- tstate, info->path, info->name, def, &singlephase);
+ main_tstate, info->path, info->name, def, &singlephase);
if (cached == NULL) {
assert(PyErr_Occurred());
goto main_finally;