Skip to content

Commit e0125f6

Browse files
chris-eiblmiss-islington
authored andcommitted
gh-146004: fix test_args_from_interpreter_flags on windows (GH-146580)
(cherry picked from commit 1af025d) Co-authored-by: Chris Eibl <138194463+chris-eibl@users.noreply.github.com>
1 parent f0e236e commit e0125f6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Lib/test/test_support.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,6 @@ def test_args_from_interpreter_flags(self):
568568
['-X', 'int_max_str_digits=1000'],
569569
['-X', 'lazy_imports=all'],
570570
['-X', 'no_debug_ranges'],
571-
['-X', 'pycache_prefix=/tmp/pycache'],
572571
['-X', 'showrefcount'],
573572
['-X', 'tracemalloc'],
574573
['-X', 'tracemalloc=3'],
@@ -577,6 +576,12 @@ def test_args_from_interpreter_flags(self):
577576
with self.subTest(opts=opts):
578577
self.check_options(opts, 'args_from_interpreter_flags')
579578

579+
with os_helper.temp_dir() as temp_path:
580+
prefix = os.path.join(temp_path, 'pycache')
581+
opts = ['-X', f'pycache_prefix={prefix}']
582+
with self.subTest(opts=opts):
583+
self.check_options(opts, 'args_from_interpreter_flags')
584+
580585
self.check_options(['-I', '-E', '-s', '-P'],
581586
'args_from_interpreter_flags',
582587
['-I'])

0 commit comments

Comments
 (0)