diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-05-16 15:02:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-16 15:02:56 (GMT) |
commit | ae239f6b0626e926613a4a1dbafa323bd41fec32 (patch) | |
tree | c811687161a90a5a03dc29b83774b5f9688579d7 /Lib | |
parent | 68b34a720485f399e8699235b8f4e08f227dd43b (diff) | |
download | cpython-ae239f6b0626e926613a4a1dbafa323bd41fec32.zip cpython-ae239f6b0626e926613a4a1dbafa323bd41fec32.tar.gz cpython-ae239f6b0626e926613a4a1dbafa323bd41fec32.tar.bz2 |
bpo-36763: Add _PyCoreConfig.parse_argv (GH-13361)
* _PyCoreConfig_Read() doesn't parse nor update argv
if parse_argv is 0.
* Move path configuration fields in _PyCoreConfig.
* Add an unit test for parse_argv=0.
* Remove unused "done": label in _Py_RunMain().
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_embed.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index 8f40e9f..3fabe5f 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -304,6 +304,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): 'pycache_prefix': None, 'program_name': GET_DEFAULT_CONFIG, + 'parse_argv': 1, 'argv': [""], 'program': '', @@ -700,6 +701,14 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): } self.check_config("run_main_config", core_config, preconfig) + def test_init_dont_parse_argv(self): + core_config = { + 'argv': ['-v', '-c', 'arg1', '-W', 'arg2'], + 'parse_argv': 0, + 'program': 'program', + } + self.check_config("init_dont_parse_argv", core_config, {}) + if __name__ == "__main__": unittest.main() |