summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-11-13 08:31:51 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-11-13 08:31:51 (GMT)
commitee36c24d15e734cd8c95ef6568f65bf02fa1e71b (patch)
tree36c37d7500d1bd3cb5c23365fbce170b24504112 /Lib/test/test_os.py
parent5ff16750f5f3154bb1b188b2193012354438f2c4 (diff)
downloadcpython-ee36c24d15e734cd8c95ef6568f65bf02fa1e71b.zip
cpython-ee36c24d15e734cd8c95ef6568f65bf02fa1e71b.tar.gz
cpython-ee36c24d15e734cd8c95ef6568f65bf02fa1e71b.tar.bz2
Issue #15478: os.lchflags() is not always available when os.chflags() is available
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 09d3e75..13f9e3a 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -2112,10 +2112,9 @@ class OSErrorTests(unittest.TestCase):
if hasattr(os, "truncate"):
funcs.append((self.filenames, os.truncate, 0))
if hasattr(os, "chflags"):
- funcs.extend((
- (self.filenames, os.chflags, 0),
- (self.filenames, os.lchflags, 0),
- ))
+ funcs.append((self.filenames, os.chflags, 0))
+ if hasattr(os, "lchflags"):
+ funcs.append((self.filenames, os.lchflags, 0))
if hasattr(os, "chroot"):
funcs.append((self.filenames, os.chroot,))
if hasattr(os, "link"):