[Checkins] SVN: grok/trunk/src/grok/ we don't support using grok
directives on classes that are not subclasses of grok classes
Wolfgang Schnerring
wosc at wosc.de
Sun Jan 7 06:39:14 EST 2007
Log message for revision 71758:
we don't support using grok directives on classes that are not subclasses of grok classes
Changed:
U grok/trunk/src/grok/ftests/utility/local.py
U grok/trunk/src/grok/tests/utility/utility.py
-=-
Modified: grok/trunk/src/grok/ftests/utility/local.py
===================================================================
--- grok/trunk/src/grok/ftests/utility/local.py 2007-01-07 11:30:48 UTC (rev 71757)
+++ grok/trunk/src/grok/ftests/utility/local.py 2007-01-07 11:39:14 UTC (rev 71758)
@@ -32,12 +32,6 @@
>>> isinstance(spiky, SpikyClub)
True
- >>> sharp = component.getUtility(IClub, name='sharp')
- >>> IClub.providedBy(sharp)
- True
- >>> isinstance(sharp, SharpClub)
- True
-
>>> mammoth = component.getUtility(IMammoth)
>>> IMammoth.providedBy(mammoth)
True
@@ -80,11 +74,6 @@
...
ComponentLookupError: (<InterfaceClass grok.ftests.utility.local.IClub>, 'spiky')
- >>> component.getUtility(IClub, name='sharp')
- Traceback (most recent call last):
- ...
- ComponentLookupError: (<InterfaceClass grok.ftests.utility.local.IClub>, 'sharp')
-
>>> component.getUtility(IMammoth)
Traceback (most recent call last):
...
@@ -130,10 +119,6 @@
class SpikyClub(object):
grok.implements(IClub, ISpiky)
-class SharpClub(object):
- grok.implements(IClub, ISpiky)
- grok.provides(IClub)
-
class Mammoth(grok.LocalUtility):
grok.implements(IMammoth, IClub)
@@ -155,7 +140,6 @@
grok.local_utility(Fireplace)
grok.local_utility(Club)
grok.local_utility(SpikyClub, provides=IClub, name='spiky')
- grok.local_utility(SharpClub, name='sharp')
grok.local_utility(Mammoth, provides=IMammoth)
grok.local_utility(SabretoothTiger, name='tiger')
grok.local_utility(CavePainting, name='blackandwhite', provides=IPainting)
Modified: grok/trunk/src/grok/tests/utility/utility.py
===================================================================
--- grok/trunk/src/grok/tests/utility/utility.py 2007-01-07 11:30:48 UTC (rev 71757)
+++ grok/trunk/src/grok/tests/utility/utility.py 2007-01-07 11:39:14 UTC (rev 71758)
@@ -40,7 +40,6 @@
True
"""
import grok
-
from zope import interface
class IClub(interface.Interface):
More information about the Checkins
mailing list