summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-10-31 21:16:38 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-10-31 21:16:38 (GMT)
commita0c811e439d299c5647a93e9f76b45d76a6796ec (patch)
treef477a86216b9f3947d7f388488ba533e7f64417c /Lib/test/test_os.py
parentb024e845974eec2c5067acb08964f36895cc01b9 (diff)
downloadcpython-a0c811e439d299c5647a93e9f76b45d76a6796ec.zip
cpython-a0c811e439d299c5647a93e9f76b45d76a6796ec.tar.gz
cpython-a0c811e439d299c5647a93e9f76b45d76a6796ec.tar.bz2
Issue #15478: Fix again to fix test_os on Windows
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index a4cf60f..42a1d00 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -2069,7 +2069,6 @@ class OSErrorTests(unittest.TestCase):
funcs = [
(os.chdir,),
(os.chmod, 0o777),
- (os.lchown, 0, 0),
(os.listdir,),
(os.lstat,),
(os.open, os.O_RDONLY),
@@ -2077,15 +2076,19 @@ class OSErrorTests(unittest.TestCase):
(os.replace, "dst"),
(os.rmdir,),
(os.stat,),
- (os.truncate, 0),
(os.unlink,),
]
if hasattr(os, "chown"):
funcs.append((os.chown, 0, 0))
+ if hasattr(os, "lchown"):
+ funcs.append((os.lchown, 0, 0))
+ if hasattr(os, "truncate"):
+ funcs.append((os.truncate, 0))
if sys.platform == "win32":
+ import nt
funcs.extend((
- (os._getfullpathname,),
- (os._isdir,),
+ (nt._getfullpathname,),
+ (nt._isdir,),
))
if hasattr(os, "chflags"):
funcs.extend((