mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
[3.13] gh-124160: Pass main_tstate to update_global_state_for_extension() (GH-124164) (#124250)
gh-124160: Pass main_tstate to update_global_state_for_extension() (GH-124164)
(cherry picked from commit 7331d0f70b
)
Co-authored-by: luk1337 <priv.luk@gmail.com>
This commit is contained in:
parent
848a21007b
commit
9bae6815a3
3 changed files with 12 additions and 1 deletions
|
@ -94,6 +94,14 @@ static void _testembed_Py_Initialize(void)
|
|||
}
|
||||
|
||||
|
||||
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
|
||||
*****************************************************/
|
||||
|
@ -2184,6 +2192,7 @@ static struct TestCase TestCases[] = {
|
|||
{"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},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue