summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-10-15 08:43:33 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-10-15 08:43:33 (GMT)
commit18aaa568fd98ec6adcd58f65ffb1a9f6943cfe53 (patch)
treeebc8b8042c9c0f99937ff8de5231a6a1fb91cffe /Lib/test/test_os.py
parentc9e82f62342b86583f0dd9f17e55da8a9d9a30e0 (diff)
downloadcpython-18aaa568fd98ec6adcd58f65ffb1a9f6943cfe53.zip
cpython-18aaa568fd98ec6adcd58f65ffb1a9f6943cfe53.tar.gz
cpython-18aaa568fd98ec6adcd58f65ffb1a9f6943cfe53.tar.bz2
Patch #1576166: Support os.utime for directories on Windows NT+.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 984484c..065d327 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -223,6 +223,13 @@ class StatAttributeTests(unittest.TestCase):
except TypeError:
pass
+ def test_utime_dir(self):
+ delta = 1000000
+ st = os.stat(test_support.TESTFN)
+ os.utime(test_support.TESTFN, (st.st_atime, st.st_mtime-delta))
+ st2 = os.stat(test_support.TESTFN)
+ self.assertEquals(st2.st_mtime, st.st_mtime-delta)
+
# Restrict test to Win32, since there is no guarantee other
# systems support centiseconds
if sys.platform == 'win32':