summaryrefslogtreecommitdiffstats
path: root/Tools/freeze
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-06 01:41:24 (GMT)
committerGitHub <noreply@github.com>2022-05-06 01:41:24 (GMT)
commit329afe78c3bbc234492a53f7a4084d07e215a077 (patch)
tree281fa4038479d8d6e92bfa1da96ce18aca56a8f5 /Tools/freeze
parent1303f8c927227b72d9ee9eae890be4692b4d4592 (diff)
downloadcpython-329afe78c3bbc234492a53f7a4084d07e215a077.zip
cpython-329afe78c3bbc234492a53f7a4084d07e215a077.tar.gz
cpython-329afe78c3bbc234492a53f7a4084d07e215a077.tar.bz2
gh-57684: Update tests for PYTHONSAFEPATH=1 (#92358)
Fix tests failing with the PYTHONSAFEPATH=1 env var. Enhance also -P help in Python usage (python --help).
Diffstat (limited to 'Tools/freeze')
-rw-r--r--Tools/freeze/test/freeze.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tools/freeze/test/freeze.py b/Tools/freeze/test/freeze.py
index abedac0..ddbfd7f 100644
--- a/Tools/freeze/test/freeze.py
+++ b/Tools/freeze/test/freeze.py
@@ -172,7 +172,8 @@ def freeze(python, scriptfile, outdir):
print(f'freezing {scriptfile}...')
os.makedirs(outdir, exist_ok=True)
- _run_quiet([python, FREEZE, '-o', outdir, scriptfile], outdir)
+ # Use -E to ignore PYTHONSAFEPATH
+ _run_quiet([python, '-E', FREEZE, '-o', outdir, scriptfile], outdir)
_run_quiet([MAKE, '-C', os.path.dirname(scriptfile)])
name = os.path.basename(scriptfile).rpartition('.')[0]