[Python-checkins] cpython: #14796: fix failure of new calendar test on windows.
r.david.murray
python-checkins at python.org
Wed May 30 14:11:01 CEST 2012
http://hg.python.org/cpython/rev/d3321c010af5
changeset: 77244:d3321c010af5
user: R David Murray <rdmurray at bitdance.com>
date: Wed May 30 08:10:54 2012 -0400
summary:
#14796: fix failure of new calendar test on windows.
files:
Lib/test/test_calendar.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py
--- a/Lib/test/test_calendar.py
+++ b/Lib/test/test_calendar.py
@@ -353,8 +353,9 @@
def test_yeardatescalendar(self):
def shrink(cal):
- return [[[' '.join((d.strftime('%D')
- for d in z)) for z in y] for y in x] for x in cal]
+ return [[[' '.join('{:02d}/{:02d}/{}'.format(
+ d.month, d.day, str(d.year)[-2:]) for d in z)
+ for z in y] for y in x] for x in cal]
self.assertEqual(
shrink(calendar.Calendar().yeardatescalendar(2004)),
result_2004_dates
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list