]> granicus.if.org Git - python/commitdiff
Actually, there's more than one failing value. (changeset 9cb1b85237a9, issue #13312).
authorFlorent Xicluna <florent.xicluna@gmail.com>
Wed, 2 Nov 2011 02:22:15 +0000 (03:22 +0100)
committerFlorent Xicluna <florent.xicluna@gmail.com>
Wed, 2 Nov 2011 02:22:15 +0000 (03:22 +0100)
Lib/test/test_time.py

index 819fef35fe35489255cf894a5e305448a7bf4b6f..28aa46fe8697a8c12b110455cd5b3648009c0dbc 100644 (file)
@@ -425,8 +425,9 @@ class _Test4dYear(_BaseYearTest):
         self.assertEqual(self.yearstr(-123456), '-123456')
         self.assertEqual(self.yearstr(-123456789), str(-123456789))
         self.assertEqual(self.yearstr(-1234567890), str(-1234567890))
-        self.assertEqual(self.yearstr(TIME_MINYEAR + 1), str(TIME_MINYEAR + 1))
-        # On some platforms it loses the sign (issue #13312)
+        # On some platforms it gives weird result (issue #13312)
+        for y in range(TIME_MINYEAR + 10000, TIME_MINYEAR, -1):
+            self.assertEqual(self.yearstr(y), str(y))
         # self.assertEqual(self.yearstr(TIME_MINYEAR), str(TIME_MINYEAR))
         self.assertRaises(OverflowError, self.yearstr, TIME_MINYEAR - 1)