[Zope-dev] Zope Tests: 72 OK, 15 Failed

Jan-Jaap Driessen jdriessen at thehealthagency.com
Fri Feb 18 03:21:12 EST 2011


On 18 February 2011 00:55, Simon Elbaz <elbazsimon9 at gmail.com> wrote:
> Hi,
> I have tried this code on Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46)
> [MSC v.1500 32 bit (Intel)] on win32. It seems that it is possible to have
> no milliseconds returned by datetime.now.
>
>>>> while 1:
> ...     datetime.now(pytz.utc)
> datetime.datetime(2011, 2, 17, 23, 48, 17, 984000, tzinfo=<UTC>)
> datetime.datetime(2011, 2, 17, 23, 48, 17, 984000, tzinfo=<UTC>)
> datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>)
> datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>)
> datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>)
> ...
> datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>)
> datetime.datetime(2011, 2, 17, 23, 48, 18, tzinfo=<UTC>)
> ...
> datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=<UTC>)
> datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=<UTC>)
> datetime.datetime(2011, 2, 17, 23, 48, 18, 15000, tzinfo=<UTC>)
> datetime.datetime(2011, 2, 17, 23, 48, 18, 125000, tzinfo=<UTC>)
> Traceback (most recent call last):
>   File "<stdin>", line 2, in <module>
>   File
> "C:\Python27\lib\site-packages\pytz-2011b-py2.7.egg\pytz\__init__.py", li
> ne 186, in utcoffset
> KeyboardInterrupt
>>>>
>
> Simon
>
> On Thu, Feb 17, 2011 at 4:58 PM, Tres Seaver <tseaver at palladion.com> wrote:
>>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 02/17/2011 06:58 AM, Zope Tests Summarizer wrote:
>>
>> > Subject: FAILED : Zope Buildbot / zopetoolkit-1.1_win-py2.5 slave-win
>> > From: jdriessen at thehealthagency.com
>> > Date: Wed Feb 16 15:03:12 EST 2011
>> > URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032218.html
>> >
>> > Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.5 slave-win
>> > From: jdriessen at thehealthagency.com
>> > Date: Wed Feb 16 15:18:08 EST 2011
>> > URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032223.html
>> >
>> > Subject: FAILED : Zope Buildbot / zopetoolkit_win-py2.6 slave-win
>> > From: jdriessen at thehealthagency.com
>> > Date: Wed Feb 16 15:25:31 EST 2011
>> > URL: http://mail.zope.org/pipermail/zope-tests/2011-February/032226.html
>>
>> These three failures are due to a quirk in how datetime.datetime repr
>> works:  if the 'microseconds' field happens to be zero, it isn't
>> printed, e.g.:
>>
>> Expected:
>>    datetime.datetime(<DATETIME>, tzinfo=<UTC>)
>> Got:
>>    datetime.datetime(2011, 2, 16, 20, 0, 43, tzinfo=<UTC>)
>>
>> The regex (in zope.dublincore.tests.test_timeannotators), expects the
>> microseconds value to be present:
>>
>>  datetime_re = (
>>     '[0-9]{4}, [0-9]{1,2}, [0-9]{1,2}, [0-9]{1,2}, [0-9]{1,2}, \
>>     [0-9]{1,2}, '
>>    '[0-9]{1,6}')
>>
>>
>> I have no idea why that value is suddenly exactly zero for the THA box.
>>
>>
>> Tres.

Simon,

Thank you for looking into this. I am kind of happy that the error can
be reproduced on a different windows machine.

Tres,

It is indeed 'special' that this error occurs only now. The windows
builds for zope.dublincore trunk have not shown this error:

http://dev.thehealthagency.com/buildbot/builders/zope.dublincore_3%20slave-win
http://dev.thehealthagency.com/buildbot/builders/zope.dublincore_5%20slave-win
http://dev.thehealthagency.com/buildbot/builders/zope.dublincore_trunk%20slave-win

How to proceed? Make the regex in
zope.dublincore.tests.test_timeannotators less strict?

I am not a pypi owner of zope.dublincore, so Tres, could you do the honors?

Jan-Jaap


More information about the Zope-Dev mailing list