[Python-checkins] cpython: Always test datetime.strftime("%4Y")

victor.stinner python-checkins at python.org
Fri Mar 11 16:36:38 EST 2016


https://hg.python.org/cpython/rev/291d47954618
changeset:   100494:291d47954618
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri Mar 11 22:36:14 2016 +0100
summary:
  Always test datetime.strftime("%4Y")

Issue #13305: Always test datetime.datetime.strftime("%4Y") for years < 1900.

files:
  Lib/test/datetimetester.py |  4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)


diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -1422,8 +1422,8 @@
             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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list