Skip to content

Commit 6171446

Browse files
committed
Fix test on Windows
legacy_windows_stdio is read-only.
1 parent b8eaa3d commit 6171446

1 file changed

Lines changed: 5 additions & 9 deletions

File tree

Lib/test/test_capi/test_config.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -384,8 +384,9 @@ def test_config_set_sys_flag(self):
384384
config_get = _testcapi.config_get
385385
config_set = _testcapi.config_set
386386
get_configs = _testinternalcapi.get_configs
387+
new_values = (0, 1, 5)
387388

388-
tests = [
389+
for name, global_name, not_value in (
389390
('bytes_warning', 'Py_BytesWarningFlag', False),
390391
('inspect', 'Py_InspectFlag', False),
391392
('interactive', 'Py_InteractiveFlag', False),
@@ -402,14 +403,9 @@ def test_config_set_sys_flag(self):
402403
#('pathconfig_warnings', 'Py_FrozenFlag', True),
403404
#('site_import', 'Py_NoSiteFlag', True),
404405
#('user_site_directory', 'Py_NoUserSiteDirectory', True),
405-
]
406-
if support.MS_WINDOWS:
407-
tests.append(
408-
('legacy_windows_stdio', 'Py_LegacyWindowsStdioFlag', False)
409-
)
410-
new_values = (0, 1, 5)
411-
412-
for name, global_name, not_value in tests:
406+
# Windows only
407+
#('legacy_windows_stdio', 'Py_LegacyWindowsStdioFlag', False)
408+
):
413409
with self.subTest(name=name):
414410
old_value = config_get(name)
415411
try:

0 commit comments

Comments
 (0)