STINNER Victor <victor.stin...@gmail.com> added the comment: > New changeset 98bc9e357f74 by R David Murray in branch 'default': > #14796: improve calendar test coverage. > http://hg.python.org/cpython/rev/98bc9e357f74
The following added test fails on Windows: ... + 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] self.assertEqual( - cal.formatyearpage(2004, encoding=encoding).strip(b' \t\n'), - result_2004_html.strip(' \t\n').encode(encoding) + shrink(calendar.Calendar().yeardatescalendar(2004)), + result_2004_dates + ) ... The "%D" format is not supported by strftime(). Extract of timemodule.c: #if defined(MS_WINDOWS) && !defined(HAVE_WCSFTIME) /* check that the format string contains only valid directives */ for(outbuf = strchr(fmt, '%'); outbuf != NULL; outbuf = strchr(outbuf+2, '%')) { if (outbuf[1]=='#') ++outbuf; /* not documented by python, */ if (outbuf[1]=='\0' || !strchr("aAbBcdHIjmMpSUwWxXyYzZ%", outbuf[1])) { PyErr_SetString(PyExc_ValueError, "Invalid format string"); Py_DECREF(format); return NULL; } } #endif ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14796> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com