summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_embed.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_embed.py')
-rw-r--r--Lib/test/test_embed.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index 36a0e77..9182061 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -30,6 +30,8 @@ API_PYTHON = 2
# _PyCoreConfig_InitIsolatedConfig()
API_ISOLATED = 3
+MAX_HASH_SEED = 4294967295
+
def debug_build(program):
program = os.path.basename(program)
@@ -382,6 +384,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'exec_prefix': GET_DEFAULT_CONFIG,
'base_exec_prefix': GET_DEFAULT_CONFIG,
'module_search_paths': GET_DEFAULT_CONFIG,
+ 'module_search_paths_set': 1,
'platlibdir': sys.platlibdir,
'site_import': 1,
@@ -1408,6 +1411,17 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
# ignore output
+class SetConfigTests(unittest.TestCase):
+ def test_set_config(self):
+ # bpo-42260: Test _PyInterpreterState_SetConfig()
+ cmd = [sys.executable, '-I', '-m', 'test._test_embed_set_config']
+ proc = subprocess.run(cmd,
+ stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ self.assertEqual(proc.returncode, 0,
+ (proc.returncode, proc.stdout, proc.stderr))
+
+
class AuditingTests(EmbeddingTestsMixin, unittest.TestCase):
def test_open_code_hook(self):
self.run_embedded_interpreter("test_open_code_hook")