[3.13] gh-146004: fix test_args_from_interpreter_flags on windows (GH-146580) (#155965)

zware <[email protected]>
Newsgroups gmane.comp.python.cvs
Message-ID <[email protected]>
https://github.com/python/cpython/commit/2143dcd9b4146e9bdb9ec44d82eea6793a27246f
commit: 2143dcd9b4146e9bdb9ec44d82eea6793a27246f
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: zware <[email protected]>
date: 2026-08-18T17:01:36-05:00
summary:

[3.13] gh-146004: fix test_args_from_interpreter_flags on windows (GH-146580) (#155965)

gh-146004: fix test_args_from_interpreter_flags on windows (GH-146580)
(cherry picked from commit 1af025dd2206eecee3ee6242f2a7cdb67173fb97)

Co-authored-by: Chris Eibl <[email protected]>

files:
M Lib/test/test_support.py

diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 74a2a1ba39a323..789aca08180e14 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -568,7 +568,6 @@ def test_args_from_interpreter_flags(self):
             ['-X', 'int_max_str_digits=1000'],
             ['-X', 'lazy_imports=all'],
             ['-X', 'no_debug_ranges'],
-            ['-X', 'pycache_prefix=/tmp/pycache'],
             ['-X', 'showrefcount'],
             ['-X', 'tracemalloc'],
             ['-X', 'tracemalloc=3'],
@@ -577,6 +576,12 @@ def test_args_from_interpreter_flags(self):
             with self.subTest(opts=opts):
                 self.check_options(opts, 'args_from_interpreter_flags')
 
+        with os_helper.temp_dir() as temp_path:
+            prefix = os.path.join(temp_path, 'pycache')
+            opts = ['-X', f'pycache_prefix={prefix}']
+            with self.subTest(opts=opts):
+                self.check_options(opts, 'args_from_interpreter_flags')
+
         self.check_options(['-I', '-E', '-s', '-P'],
                            'args_from_interpreter_flags',
                            ['-I'])

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.