Commit ee36c24d authored by Victor Stinner's avatar Victor Stinner

Issue #15478: os.lchflags() is not always available when os.chflags() is available

parent 5ff16750
...@@ -2112,10 +2112,9 @@ class OSErrorTests(unittest.TestCase): ...@@ -2112,10 +2112,9 @@ class OSErrorTests(unittest.TestCase):
if hasattr(os, "truncate"): if hasattr(os, "truncate"):
funcs.append((self.filenames, os.truncate, 0)) funcs.append((self.filenames, os.truncate, 0))
if hasattr(os, "chflags"): if hasattr(os, "chflags"):
funcs.extend(( funcs.append((self.filenames, os.chflags, 0))
(self.filenames, os.chflags, 0), if hasattr(os, "lchflags"):
(self.filenames, os.lchflags, 0), funcs.append((self.filenames, os.lchflags, 0))
))
if hasattr(os, "chroot"): if hasattr(os, "chroot"):
funcs.append((self.filenames, os.chroot,)) funcs.append((self.filenames, os.chroot,))
if hasattr(os, "link"): if hasattr(os, "link"):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment