[Zope3-dev] Python 2.4 build problem

Fred Drake fdrake at gmail.com
Wed Jan 19 10:01:13 EST 2005


On Wed, 19 Jan 2005 14:33:30 +0100, Christian Wiese <jeru at ixplanet.org> wrote:
> File
> "/usr/local/src/zope3/trunk/Zope3/src/zope/app/apidoc/viewmodule/__init__.py",
> line 139, in zope.app.apidoc.viewmodule.SkinDocumentation
> Failed example:
>     pprint(doc.layers)
> Expected:
>     [LayerDocumentation(u'layer3'), LayerDocumentation(u'layer2')]
> Got:
>     [LayerDocumentation(u'layer2'), LayerDocumentation(u'layer3')]
> 
> ...
> 
> Failure in test getSkins (zope.app.apidoc.viewmodule.browser.SkinLayer)
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/unittest.py", line 260, in run
>     testMethod()
>   File "/usr/local/src/zope3/trunk/Zope3/src/zope/testing/doctest.py", line
> 2187, in runTest
>     raise self.failureException(self.format_failure(new.getvalue()))
> AssertionError: Failed doctest test for
> zope.app.apidoc.viewmodule.browser.SkinLayer.getSkins
>   File
> "/usr/local/src/zope3/trunk/Zope3/src/zope/app/apidoc/viewmodule/browser.py",
> line 88, in getSkins
> 
> ----------------------------------------------------------------------
> File
> "/usr/local/src/zope3/trunk/Zope3/src/zope/app/apidoc/viewmodule/browser.py",
> line 98, in zope.app.apidoc.viewmodule.browser.SkinLayer.getSkins
> Failed example:
>     pprint(skins)
> Expected:
>     [SkinDocumentation(u'skinA', []),
>      SkinDocumentation(u'skinB', [u'layer1', u'layer2']),
>      SkinDocumentation(u'skinC', [u'layer3', u'layer2'])]
> Got:
>     [SkinDocumentation(u'skinA', []),
>      SkinDocumentation(u'skinB', [u'layer1', u'layer2']),
>      SkinDocumentation(u'skinC', [u'layer2', u'layer3'])]

These seem to be broken tests; they appear to be (indirectly) relying
on the hash values of some values and the order in which keys are
inserted in dictionaries.

If that is indeed the case, the tests should be fixed to ignore the
arbitrary ordering of the lists of values.

Stephan Richter should confirm that this is indeed the problem before
anyone goes and changes the tests, though.


  -Fred

-- 
Fred L. Drake, Jr.    <fdrake at gmail.com>
Zope Corporation


More information about the Zope3-dev mailing list