[Python-checkins] cpython: Issue #13847: Fix test_mktime(), time.localtime() now raises OSError

victor.stinner python-checkins at python.org
Fri Jan 27 00:50:32 CET 2012


http://hg.python.org/cpython/rev/516d42a6e518
changeset:   74641:516d42a6e518
user:        Victor Stinner <victor.stinner at haypocalc.com>
date:        Fri Jan 27 00:50:33 2012 +0100
summary:
  Issue #13847: Fix test_mktime(), time.localtime() now raises OSError

files:
  Lib/test/test_time.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py
--- a/Lib/test/test_time.py
+++ b/Lib/test/test_time.py
@@ -309,7 +309,7 @@
         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)

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list