mirror of
https://github.com/python/cpython.git
synced 2025-11-02 03:01:58 +00:00
gh-129033: Remove _Py_InitializeMain() function (#129034)
Co-authored-by: Alyssa Coghlan <ncoghlan@gmail.com>
This commit is contained in:
parent
c463270c73
commit
07c3518ffb
7 changed files with 15 additions and 153 deletions
|
|
@ -1274,24 +1274,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
}
|
||||
self.check_all_configs("test_init_run_main", config, api=API_PYTHON)
|
||||
|
||||
def test_init_main(self):
|
||||
code = ('import _testinternalcapi, json; '
|
||||
'print(json.dumps(_testinternalcapi.get_configs()))')
|
||||
config = {
|
||||
'argv': ['-c', 'arg2'],
|
||||
'orig_argv': ['python3',
|
||||
'-c', code,
|
||||
'arg2'],
|
||||
'program_name': './python3',
|
||||
'run_command': code + '\n',
|
||||
'parse_argv': True,
|
||||
'_init_main': False,
|
||||
'sys_path_0': '',
|
||||
}
|
||||
self.check_all_configs("test_init_main", config,
|
||||
api=API_PYTHON,
|
||||
stderr="Run Python code before _Py_InitializeMain")
|
||||
|
||||
def test_init_parse_argv(self):
|
||||
config = {
|
||||
'parse_argv': True,
|
||||
|
|
@ -1768,7 +1750,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
|
||||
def test_init_set_config(self):
|
||||
config = {
|
||||
'_init_main': 0,
|
||||
'bytes_warning': 2,
|
||||
'warnoptions': ['error::BytesWarning'],
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue