[Checkins] SVN: grok/trunk/src/grok/ test that definition order doesn't matter

Philipp von Weitershausen philikon at philikon.de
Sat Oct 14 14:00:03 EDT 2006


Log message for revision 70619:
  test that definition order doesn't matter
  

Changed:
  U   grok/trunk/src/grok/adapter.txt
  A   grok/trunk/src/grok/tests/order.py

-=-
Modified: grok/trunk/src/grok/adapter.txt
===================================================================
--- grok/trunk/src/grok/adapter.txt	2006-10-14 17:56:59 UTC (rev 70618)
+++ grok/trunk/src/grok/adapter.txt	2006-10-14 18:00:02 UTC (rev 70619)
@@ -61,5 +61,20 @@
   >>> isinstance(home, Home)
   True
 
+Clean up:
+
+  >>> cleanUp()
+
 If the model is defined after the adapter, it should still be grokked
 properly:
+
+  >>> grok.grok('grok.tests.order')
+
+  >>> from grok.tests.order import IHome, Home, Cave
+  >>> cave = Cave()
+  >>> home = IHome(cave)
+
+  >>> IHome.providedBy(home)
+  True
+  >>> isinstance(home, Home)
+  True

Added: grok/trunk/src/grok/tests/order.py
===================================================================
--- grok/trunk/src/grok/tests/order.py	2006-10-14 17:56:59 UTC (rev 70618)
+++ grok/trunk/src/grok/tests/order.py	2006-10-14 18:00:02 UTC (rev 70619)
@@ -0,0 +1,11 @@
+import grok
+from zope import interface
+
+class IHome(interface.Interface):
+    pass
+
+class Home(grok.Adapter):
+    grok.implements(IHome)
+
+class Cave(grok.Model):
+    pass


Property changes on: grok/trunk/src/grok/tests/order.py
___________________________________________________________________
Name: svn:eol-style
   + native



More information about the Checkins mailing list