mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
Patch #1576166: Support os.utime for directories on Windows NT+.
This commit is contained in:
parent
c9e82f6234
commit
18aaa568fd
3 changed files with 14 additions and 2 deletions
|
@ -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':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue