diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-03-27 00:26:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-27 00:26:18 +0100 |
commit | 6da20a49507c46738632baf3e4bfe3bdd086155b (patch) | |
tree | 87f5c0c3842b536d2b3c015f1bf4992b1d279f73 /Lib/test/test_embed.py | |
parent | 6cd658b1a5cb2413230dbc2d9395d20498be8518 (diff) | |
download | cpython-git-6da20a49507c46738632baf3e4bfe3bdd086155b.tar.gz |
bpo-36301: Test Python init with isolated (GH-12569)
Add test_preinit_isolated1() and test_preinit_isolated2() test_embed.
Diffstat (limited to 'Lib/test/test_embed.py')
-rw-r--r-- | Lib/test/test_embed.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index 7efd5be23e..c44d24ecfd 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -662,6 +662,26 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): } self.check_config("init_isolated", config, preconfig) + def test_preinit_isolated1(self): + # _PyPreConfig.isolated=1, _PyCoreConfig.isolated not set + preconfig = {} + config = { + 'isolated': 1, + 'use_environment': 0, + 'user_site_directory': 0, + } + self.check_config("preinit_isolated1", config, preconfig) + + def test_preinit_isolated2(self): + # _PyPreConfig.isolated=0, _PyCoreConfig.isolated=1 + preconfig = {} + config = { + 'isolated': 1, + 'use_environment': 0, + 'user_site_directory': 0, + } + self.check_config("preinit_isolated2", config, preconfig) + if __name__ == "__main__": unittest.main() |