Skip to content

Commit 1b227a7

Browse files
committed
Use -X frozen_modules=off in the test
1 parent ded8302 commit 1b227a7

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

Lib/test/test_cmd_line.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,10 @@ def test_dump_path_config(self):
13181318
# gh-151253: At the first import (import encodings) during Python
13191319
# startup, if the import fails, dump the Python path configuration.
13201320
nonexistent = '/nonexistent-python-path'
1321-
proc = assert_python_failure("-c", "pass", PYTHONHOME=nonexistent)
1321+
# Use -X frozen_modules=off to disable frozen encodings module
1322+
# on release build.
1323+
cmd = ["-X", "frozen_modules=off", "-c", "pass"]
1324+
proc = assert_python_failure(*cmd, PYTHONHOME=nonexistent)
13221325
self.assertIn(b'Python path configuration:', proc.err)
13231326
self.assertIn(f"PYTHONHOME = '{nonexistent}'".encode(), proc.err)
13241327

0 commit comments

Comments
 (0)