Commit b29174b6 authored by Victor Stinner's avatar Victor Stinner

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

Issue #13305: Always test datetime.datetime.strftime("%4Y") for years < 1900.
parent c921cd9e
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment