[Python-Dev] test_strptime failed

Raymond Hettinger python@rcn.com
Fri, 27 Jun 2003 14:11:48 -0400


> On Thu, 2003-06-12 at 18:24, Brett C. wrote:
> > > test test_strptime failed -- Traceback (most recent call last):
> > >   File "/home/jeremy/src/python/dist/src/Lib/test/test_strptime.py",
> > > line 203, in test_compile
> > >     self.failUnless(found, "Matching failed on '%s' using '%s' regex" %
> > >   File "/home/jeremy/src/python/dist/src/Lib/unittest.py", line 268, in
> > > failUnless
> > >     if not expr: raise self.failureException, msg
> > > AssertionError: Matching failed on 'Thu 05 Jun 2003 05:46:43 PM EDT'
> > > using
> > > '(?P<a>Mon|Tue|Wed|Thu|Fri|Sat|Sun)\s*(?P<d>3[0-1]|[1-2]\d|0[1-9]|[1-9]|
> > >
[1-9])\s*(?P<b>Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s*(?P<Y>\d\d\d\d)\s*(?P<I>1[0-2]|0[1-9]|[1-9]):(?P<M>[0-5]\d|\d):(
?P<S>6[0-1]|[0-5]\d|\d)\s*(?P<p>AM|PM)\s*EST' regex
> > >
> >
> > Jeremy, are you still getting this failure?  How about anyone else?
>
> Strangely enough, I am.  I've run the tests irregularly over the last
> couple of weeks without seeing it.  But today I ran the tests and say
> the failure.

I've run the test hundreds of times and observed no failures on
my WindowsME box.

The traceback above shows the pattern matches through the timezone
and fails on 'EDT' vs 'EST' with the EDT being correct for this time of year.

The EDT version comes from time.strftime().
I suspect the pattern's timezone is extracted from
another source and the difference only shows up
on certain platforms.  This doesn't explain the
transient nature of the bug or what needs to be
changed, but I hope it helps a bit.


Raymond Hettinger


#################################################################
#################################################################
#################################################################
#####
#####
#####
#################################################################
#################################################################
#################################################################