]> granicus.if.org Git - python/commitdiff
This should fix mktime test on Windows
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>
Tue, 11 Jan 2011 02:22:16 +0000 (02:22 +0000)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>
Tue, 11 Jan 2011 02:22:16 +0000 (02:22 +0000)
Lib/test/test_time.py

index 574a867ce209ab0339e2a9e9c9553fd45b695435..7266e27295fadd32298d77c0b4053cd3c424a30f 100644 (file)
@@ -347,7 +347,8 @@ class _Test4dYear(_BaseYearTest):
                 tt = time.localtime(t)
             except (OverflowError, ValueError):
                 pass
-            self.assertEqual(time.mktime(tt), t)
+            else:
+                self.assertEqual(time.mktime(tt), t)
         # It may not be possible to reliably make mktime return error
         # on all platfom.  This will make sure that no other exception
         # than OverflowError is raised for an extreme value.