]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #15478: Fix test_os on Windows (os.chown is missing)
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 31 Oct 2012 00:04:10 +0000 (01:04 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 31 Oct 2012 00:04:10 +0000 (01:04 +0100)
Lib/test/test_os.py

index e5864ed83b9b18e8ca2b404b052f3154bccc66fc..0d1f60a4f361bc68ac62e87cbd69d4c9707af4da 100644 (file)
@@ -2069,7 +2069,6 @@ class OSErrorTests(unittest.TestCase):
         funcs = [
             (os.chdir,),
             (os.chmod, 0o777),
-            (os.chown, 0, 0),
             (os.lchown, 0, 0),
             (os.listdir,),
             (os.lstat,),
@@ -2081,6 +2080,8 @@ class OSErrorTests(unittest.TestCase):
             (os.truncate, 0),
             (os.unlink,),
         ]
+        if hasattr(os, "chown"):
+            funcs.append((os.chown, 0, 0))
         if sys.platform == "win32":
             funcs.extend((
                 (os._getfullpathname,),