]> granicus.if.org Git - python/commitdiff
Issue #13847: Fix test_mktime(), time.localtime() now raises OSError
authorVictor Stinner <victor.stinner@haypocalc.com>
Thu, 26 Jan 2012 23:50:33 +0000 (00:50 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Thu, 26 Jan 2012 23:50:33 +0000 (00:50 +0100)
Lib/test/test_time.py

index 0533895d81f092f918d4d70d9cc1d9722a85a9d0..292cb8545fd0c5a77afa1382fde7ee20f2e030aa 100644 (file)
@@ -309,7 +309,7 @@ class TimeTestCase(unittest.TestCase):
         for t in (-2, -1, 0, 1):
             try:
                 tt = time.localtime(t)
-            except (OverflowError, ValueError):
+            except (OverflowError, OSError):
                 pass
             else:
                 self.assertEqual(time.mktime(tt), t)