[Checkins] SVN: z3c.traverser/trunk/src/z3c/traverser/stackinfo/ fixed interface and added test for it

Bernd Dorn bernd.dorn at lovelysystems.com
Mon Dec 4 11:28:39 EST 2006


Log message for revision 71393:
  fixed interface and added test for it

Changed:
  U   z3c.traverser/trunk/src/z3c/traverser/stackinfo/README.txt
  U   z3c.traverser/trunk/src/z3c/traverser/stackinfo/interfaces.py

-=-
Modified: z3c.traverser/trunk/src/z3c/traverser/stackinfo/README.txt
===================================================================
--- z3c.traverser/trunk/src/z3c/traverser/stackinfo/README.txt	2006-12-04 14:45:23 UTC (rev 71392)
+++ z3c.traverser/trunk/src/z3c/traverser/stackinfo/README.txt	2006-12-04 16:28:38 UTC (rev 71393)
@@ -53,14 +53,20 @@
   >>> request.getTraversalStack()
   [u'index.html', u'path', u'some']
 
-There is a base class for consumer implementations. Let us define a
-custom consumer.
+There is a base class for consumer implementations which implements
+the ITraversalStackConsumer interface.
 
   >>> from z3c.traverser.stackinfo import consumer
+  >>> from zope.interface.verify import verifyObject
+  >>> o = consumer.BaseConsumer(None, None)
+  >>> verifyObject(interfaces.ITraversalStackConsumer,o)
+  True
+
+Let us define a custom consumer.
+
   >>> from zope import component
   >>> class DummyConsumer(consumer.BaseConsumer):
   ...     component.adapts(IContent, IBrowserRequest)
-
   >>> component.provideAdapter(DummyConsumer, name='some')
 
 Now we will find the newly registered consumer and the 'some' part of

Modified: z3c.traverser/trunk/src/z3c/traverser/stackinfo/interfaces.py
===================================================================
--- z3c.traverser/trunk/src/z3c/traverser/stackinfo/interfaces.py	2006-12-04 14:45:23 UTC (rev 71392)
+++ z3c.traverser/trunk/src/z3c/traverser/stackinfo/interfaces.py	2006-12-04 16:28:38 UTC (rev 71393)
@@ -13,6 +13,6 @@
     arguments = schema.Tuple(title=u'Arguments',
         description=u'The argument names to be consumed')
     
-    def consume(stack):
+    def consume():
         """consumes the items from the stack, and sets the __name__
         and attributes"""



More information about the Checkins mailing list