From: Alexander Belopolsky Date: Mon, 2 May 2011 17:48:09 +0000 (-0400) Subject: Relax %Y test. X-Git-Tag: v3.3.0a1~2427 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4409493d737440843f4257229fbf01fc845458f9;p=python Relax %Y test. --- diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 4a62bd4a9e..f91e8fc492 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -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