Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -1232,21 +1232,6 @@ def test_init_dont_configure_locale(self):
self.check_all_configs("test_init_dont_configure_locale", {}, preconfig,
api=API_PYTHON)

@unittest.skip('as of 3.11 this test no longer works because '
'path calculations do not occur on read')
def test_init_read_set(self):
config = {
'program_name': './init_read_set',
'executable': 'my_executable',
'base_executable': 'my_executable',
}
def modify_path(path):
path.insert(1, "test_path_insert1")
path.append("test_path_append")
self.check_all_configs("test_init_read_set", config,
api=API_PYTHON,
modify_path_cb=modify_path)

def test_init_sys_add(self):
config = {
'faulthandler': 1,
Expand Down
39 changes: 0 additions & 39 deletions Programs/_testembed.c
Original file line number Diff line number Diff line change
Expand Up @@ -1506,44 +1506,6 @@ static int test_audit_run_stdin(void)
return run_audit_run_test(Py_ARRAY_LENGTH(argv), argv, &test);
}

static int test_init_read_set(void)
{
PyStatus status;
PyConfig config;
PyConfig_InitPythonConfig(&config);

config_set_string(&config, &config.program_name, L"./init_read_set");

status = PyConfig_Read(&config);
if (PyStatus_Exception(status)) {
goto fail;
}

status = PyWideStringList_Insert(&config.module_search_paths,
1, L"test_path_insert1");
if (PyStatus_Exception(status)) {
goto fail;
}

status = PyWideStringList_Append(&config.module_search_paths,
L"test_path_append");
if (PyStatus_Exception(status)) {
goto fail;
}

/* override executable computed by PyConfig_Read() */
config_set_string(&config, &config.executable, L"my_executable");
init_from_config_clear(&config);

dump_config();
Py_Finalize();
return 0;

fail:
PyConfig_Clear(&config);
Py_ExitStatusException(status);
}


static int test_init_sys_add(void)
{
Expand Down Expand Up @@ -2398,7 +2360,6 @@ static struct TestCase TestCases[] = {
{"test_preinit_isolated2", test_preinit_isolated2},
{"test_preinit_parse_argv", test_preinit_parse_argv},
{"test_preinit_dont_parse_argv", test_preinit_dont_parse_argv},
{"test_init_read_set", test_init_read_set},
{"test_init_run_main", test_init_run_main},
{"test_init_sys_add", test_init_sys_add},
{"test_init_setpath", test_init_setpath},
Expand Down
Loading