From: Victor Stinner Date: Fri, 11 Mar 2016 21:36:14 +0000 (+0100) Subject: Always test datetime.strftime("%4Y") X-Git-Tag: v3.6.0a1~499 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=474ebbbe50ea3247ad120324874b8b32d5fa550d;p=python Always test datetime.strftime("%4Y") Issue #13305: Always test datetime.datetime.strftime("%4Y") for years < 1900. --- diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index b49942ac73..0be1af4c6e 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -1422,8 +1422,8 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase): if d.strftime("%Y") != '%04d' % y: # Year 42 returns '42', not padded self.assertEqual(d.strftime("%Y"), '%d' % y) - # '0042' is obtained anyway - self.assertEqual(d.strftime("%4Y"), '%04d' % y) + # '0042' is obtained anyway + self.assertEqual(d.strftime("%4Y"), '%04d' % y) def test_replace(self): cls = self.theclass