On 03.08.09 20:15, Chris McDonough wrote: > On 8/3/09 1:07 PM, Shane Hathaway wrote: > >> Marius Gedminas wrote: >> >>> On Sun, Aug 02, 2009 at 08:48:24PM +0200, Andreas Jung wrote: >>> >>>> Hi, >>>> >>>> the doctests for zope.index 3.5.2 - as used in Zope 2.12 - fail badly: >>>> >>>> File >>>> "/home/ajung/.buildout/eggs/zope.index-3.5.2-py2.6-linux-x86_64.egg/zope/index/text/tests/../textindex.txt", >>>> line 143, in textindex.txt >>>> Failed example: >>>> [(k, "%.4f" % v) for (k, v) in index2.apply("Zorro").items()] == >>>> result >>>> >>> I'm assuming items() returns a plain Python dictionary with string keys. >>> >>> Python's string hashes return different valuesfor half of all the strings >>> on 64-bit machines. This influences the ordering of dictionary keys and >>> some other things too (such as the sequence of random numbers you get if >>> you use a string as the seed). >>> >>> Add a sorted() on both sides and the test should pass. >>> >> Actually, those tests were plain insane and I've fixed them on the >> trunk. I intend to make a new zope.index release today. >> >> How insane were these tests? Well, the author of the tests noticed that >> the C optimization produces different scores than the Python version, >> and compensated for that in a way that dramatically reduced readability. >> Is there a buildbot for the zope.* or ZTK packages testing them under Linux 32bit and 64 bit?
Andreas
begin:vcard fn:Andreas Jung n:Jung;Andreas org:ZOPYX Ltd. & Co. KG adr;quoted-printable:;;Charlottenstr. 37/1;T=C3=BCbingen;;72070;Germany email;internet:i...@zopyx.com title:CEO tel;work:+49-7071-793376 tel;fax:+49-7071-7936840 tel;home:+49-7071-793257 x-mozilla-html:FALSE url:www.zopyx.com version:2.1 end:vcard
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )