Message161934
> 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 |
|
Date |
User |
Action |
Args |
2012-05-30 08:21:07 | vstinner | set | recipients:
+ vstinner, rhettinger, ncoghlan, giampaolo.rodola, ezio.melotti, r.david.murray, python-dev, Oleg.Plakhotnyuk |
2012-05-30 08:21:07 | vstinner | set | messageid: <1338366067.85.0.267077086965.issue14796@psf.upfronthosting.co.za> |
2012-05-30 08:21:07 | vstinner | link | issue14796 messages |
2012-05-30 08:21:06 | vstinner | create | |
|