Skip to content

Commit 1af025d

Browse files
authored
gh-146004: fix test_args_from_interpreter_flags on windows (#146580)
1 parent 1fd66ea commit 1af025d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Lib/test/test_support.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,6 @@ def test_args_from_interpreter_flags(self):
577577
['-X', 'int_max_str_digits=1000'],
578578
['-X', 'lazy_imports=all'],
579579
['-X', 'no_debug_ranges'],
580-
['-X', 'pycache_prefix=/tmp/pycache'],
581580
['-X', 'showrefcount'],
582581
['-X', 'tracemalloc'],
583582
['-X', 'tracemalloc=3'],
@@ -586,6 +585,12 @@ def test_args_from_interpreter_flags(self):
586585
with self.subTest(opts=opts):
587586
self.check_options(opts, 'args_from_interpreter_flags')
588587

588+
with os_helper.temp_dir() as temp_path:
589+
prefix = os.path.join(temp_path, 'pycache')
590+
opts = ['-X', f'pycache_prefix={prefix}']
591+
with self.subTest(opts=opts):
592+
self.check_options(opts, 'args_from_interpreter_flags')
593+
589594
self.check_options(['-I', '-E', '-s', '-P'],
590595
'args_from_interpreter_flags',
591596
['-I'])

0 commit comments

Comments
 (0)