[Grok-dev] strange test failures on trunk

Martijn Faassen faassen at startifact.com
Tue Jan 22 05:25:44 EST 2008


Hi there,

I just tried running the tests on the trunk and I get these rather 
strange tests failures:

File 
"/home/faassen/tmp/grok-trunk/src/grok/tests/view/inline_unassociated.py", 
line 10, in grok.tests.view.inline_unassociated
Failed example:
     grok.testing.grok(__name__)
Expected:
     From tests.py's showwarning():
     ...UserWarning: Found the following unassociated template(s) when 
grokking
     'grok.tests.view.inline_unassociated': club.  Define view classes 
inheriting
     from grok.View to enable the template(s).
Got:
     From tests.py's showwarning():
 
/home/faassen/eggs/zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.pyc:610: 
UserWarning: Found the following unassociated template(s) when grokking 
'grok.tests.view.inline_unassociated': club.  Define view classes 
inheriting from grok.View to enable the template(s).
       >>> definition['sub'] = Iab, ''

and this one:

File "/home/faassen/tmp/grok-trunk/src/grok/tests/view/unassociated.py", 
line 10, in grok.tests.view.unassociated
Failed example:
     grok.testing.grok(__name__)
Expected:
     From tests.py's showwarning():
     ...UserWarning: Found the following unassociated template(s) when 
grokking
     'grok.tests.view.unassociated': index.  Define view classes 
inheriting from
     grok.View to enable the template(s).
Got:
     From tests.py's showwarning():
 
/home/faassen/eggs/zope.configuration-3.4.0-py2.4.egg/zope/configuration/config.pyc:610: 
UserWarning: Found the following unassociated template(s) when grokking 
'grok.tests.view.unassociated': index.  Define view classes inheriting 
from grok.View to enable the template(s).
       >>> definition['sub'] = Iab, ''

I grepped in the Grok sources for "definition['sub']" but couldn't find 
it. Bizarrely enough I could find this in zope.configuration.config, in 
unrelated doctests:

     We need a complex directive definition:

     >>> class Ixy(Interface):
     ...    x = zope.schema.TextLine()
     ...    y = zope.schema.TextLine()
     >>> definition = ComplexDirectiveDefinition(
     ...        context, name="test", schema=Ixy,
     ...        handler=Handler)
     >>> class Iab(Interface):
     ...    a = zope.schema.TextLine()
     ...    b = zope.schema.TextLine()
     >>> definition['sub'] = Iab, ''

How in the world does this stuff end up interfering with the Grok 
doctests? I'll continue looking for a bit, but perhaps someone knows the 
answer to this mystery?

Regards,

Martijn





More information about the Grok-dev mailing list