]> granicus.if.org Git - python/commitdiff
Relax %Y test.
authorAlexander Belopolsky <alexander.belopolsky@gmail.com>
Mon, 2 May 2011 17:48:09 +0000 (13:48 -0400)
committerAlexander Belopolsky <alexander.belopolsky@gmail.com>
Mon, 2 May 2011 17:48:09 +0000 (13:48 -0400)
Lib/test/datetimetester.py

index 4a62bd4a9efa2d4b3d03d64b9d7272a60d82a885..f91e8fc4927342e613eab542d43afa42f73fb4a2 100644 (file)
@@ -1291,8 +1291,8 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase):
 
     def test_strftime_y2k(self):
         for y in (1, 49, 70, 99, 100, 999, 1000, 1970):
-            self.assertEqual(self.theclass(y, 1, 1).strftime("%Y"),
-                             '%04d' % y)
+            self.assertIn(self.theclass(y, 1, 1).strftime("%Y"),
+                          [str(y),'%04d' % y])
 
     def test_replace(self):
         cls = self.theclass