Issue #15478: Fix test_os on Windows (os.chown is missing)
This commit is contained in:
parent
7a6d7cf3db
commit
f69055efba
|
@ -2069,7 +2069,6 @@ class OSErrorTests(unittest.TestCase):
|
||||||
funcs = [
|
funcs = [
|
||||||
(os.chdir,),
|
(os.chdir,),
|
||||||
(os.chmod, 0o777),
|
(os.chmod, 0o777),
|
||||||
(os.chown, 0, 0),
|
|
||||||
(os.lchown, 0, 0),
|
(os.lchown, 0, 0),
|
||||||
(os.listdir,),
|
(os.listdir,),
|
||||||
(os.lstat,),
|
(os.lstat,),
|
||||||
|
@ -2081,6 +2080,8 @@ class OSErrorTests(unittest.TestCase):
|
||||||
(os.truncate, 0),
|
(os.truncate, 0),
|
||||||
(os.unlink,),
|
(os.unlink,),
|
||||||
]
|
]
|
||||||
|
if hasattr(os, "chown"):
|
||||||
|
funcs.append((os.chown, 0, 0))
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
funcs.extend((
|
funcs.extend((
|
||||||
(os._getfullpathname,),
|
(os._getfullpathname,),
|
||||||
|
|
Loading…
Reference in New Issue