diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-01-03 00:19:11 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2011-01-03 00:19:11 (GMT) |
commit | a251a853c7142bbf5dbcca0971e04f3cc8e5b534 (patch) | |
tree | bd53e4140fa3dc6fbe7f69f014587b179df61ec7 /Lib/test/test_os.py | |
parent | 9f6d48ba4e43b9cadd0b842e6ed1abbfebf759ed (diff) | |
download | cpython-a251a853c7142bbf5dbcca0971e04f3cc8e5b534.zip cpython-a251a853c7142bbf5dbcca0971e04f3cc8e5b534.tar.gz cpython-a251a853c7142bbf5dbcca0971e04f3cc8e5b534.tar.bz2 |
#8278: In the Windows implementation of stat() and utime(),
use time_t instead of int. This gives support for dates after 2038,
at least when compiled with VS2003 or later, where time_t is 64bit.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 497d809..544eee1 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -365,6 +365,11 @@ class StatAttributeTests(unittest.TestCase): os.utime(self.fname, (t1, t1)) self.assertEqual(os.stat(self.fname).st_mtime, t1) + def test_large_time(self): + t1 = 5000000000 # some day in 2128 + os.utime(self.fname, (t1, t1)) + self.assertEqual(os.stat(self.fname).st_mtime, t1) + def test_1686475(self): # Verify that an open file can be stat'ed try: |