MCPcopy Index your code
hub / github.com/python/cpython / test_preinit_parse_argv

Method test_preinit_parse_argv

Lib/test/test_embed.py:1203–1219  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1201 api=API_PYTHON)
1202
1203 def test_preinit_parse_argv(self):
1204 # Pre-initialize implicitly using argv: make sure that -X dev
1205 # is used to configure the allocation in preinitialization
1206 preconfig = {}
1207 config = {
1208 'argv': ['script.py'],
1209 'orig_argv': ['python3', '-X', 'dev', '-P', 'script.py'],
1210 'run_filename': os.path.abspath('script.py'),
1211 'dev_mode': True,
1212 'faulthandler': True,
1213 'warnoptions': ['default'],
1214 'xoptions': {'dev': True},
1215 'safe_path': True,
1216 }
1217 config_dev_mode(preconfig, config)
1218 self.check_all_configs("test_preinit_parse_argv", config, preconfig,
1219 api=API_PYTHON)
1220
1221 def test_preinit_dont_parse_argv(self):
1222 # -X dev must be ignored by isolated preconfiguration

Callers

nothing calls this directly

Calls 3

check_all_configsMethod · 0.95
config_dev_modeFunction · 0.85
abspathMethod · 0.45

Tested by

no test coverage detected