Always test datetime.strftime("%4Y")

Issue #13305: Always test datetime.datetime.strftime("%4Y") for years < 1900.
This commit is contained in:
Victor Stinner 2016-03-11 22:36:14 +01:00
parent 2c2a4e63d7
commit 474ebbbe50

View file

@ -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