macos test for pathconf_names

This commit is contained in:
Jeong YunWon
2023-02-27 14:22:42 +09:00
parent e25b89d49a
commit fcacdb2791

View File

@@ -509,8 +509,12 @@ if "win" not in sys.platform:
assert_raises(TypeError, os.system, arg)
# Testing for os.pathconf_names
if sys.platform.startswith('linux'):
if not sys.platform.startswith('win'):
assert len(os.pathconf_names) > 0
assert 'PC_NAME_MAX' in os.pathconf_names
for option,index in os.pathconf_names.items():
for option, index in os.pathconf_names.items():
if sys.platform == "darwin":
# TODO: check why it fails
if option in ["PC_MAX_CANON", "PC_MAX_INPUT", "PC_VDISABLE"]:
continue
assert os.pathconf('/', index) == os.pathconf('/', option)