mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
bpo-36301: Test Python init with isolated (GH-12569)
Add test_preinit_isolated1() and test_preinit_isolated2() test_embed.
This commit is contained in:
parent
6cd658b1a5
commit
6da20a4950
2 changed files with 90 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue