[Checkins]
SVN: grok/branches/darrylcousins-branch/src/grok/tests/adapter/
Attempting to merge trunk src r77309 into this branch
Darryl Cousins
darryl at darrylcousins.net.nz
Mon Jul 2 21:53:03 EDT 2007
Log message for revision 77319:
Attempting to merge trunk src r77309 into this branch
Changed:
D grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py
A grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py
D grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py
A grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py
D grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py
A grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py
-=-
Deleted: grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py
===================================================================
--- grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py 2007-07-03 01:38:47 UTC (rev 77318)
+++ grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py 2007-07-03 01:53:02 UTC (rev 77319)
@@ -1,71 +0,0 @@
-"""
- >>> grok.grok(__name__)
- >>>
- >>> cave = Cave()
- >>> home = IHome(cave)
- >>> IHome.providedBy(home)
- True
- >>>
- >>> isinstance(home, Home)
- True
- >>> morehome = IMoreHome(cave)
- >>> IHome.providedBy(morehome)
- True
- >>> isinstance(morehome, Home)
- True
- >>> yetanotherhome = IYetAnotherHome(cave)
- >>> IHome.providedBy(yetanotherhome)
- True
- >>> isinstance(yetanotherhome, Home)
- True
-
- >>> from grok.tests.adapter import noarguments_fixture
- Traceback (most recent call last):
- ...
- GrokImportError: @grok.adapter requires at least one argument.
-
- >>> from grok.tests.adapter import functionasargument_fixture
- Traceback (most recent call last):
- ...
- GrokImportError: @grok.adapter requires at least one argument.
-
-"""
-
-import grok
-from zope import interface
-
-class IDummy(interface.Interface):
- pass
-
-class ICave(interface.Interface):
- pass
-
-class IHome(interface.Interface):
- pass
-
-class IMoreHome(interface.Interface):
- pass
-
-class IYetAnotherHome(interface.Interface):
- pass
-
-class Cave(grok.Model):
- grok.implements(ICave)
- pass
-
-class Home(object):
- grok.implements(IHome)
-
- at grok.adapter(Cave)
- at grok.implementer(IHome)
-def home_for_cave(cave):
- return Home()
-
- at grok.adapter(ICave)
- at grok.implementer(IMoreHome)
-def more_home_for_cave(cave):
- return Home()
-
- at grok.implementer(IYetAnotherHome)
-def yet_another_home_for_cave(cave):
- return Home()
Copied: grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py (from rev 77318, grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py)
===================================================================
--- grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py (rev 0)
+++ grok/branches/darrylcousins-branch/src/grok/tests/adapter/adapterdecorator.py 2007-07-03 01:53:02 UTC (rev 77319)
@@ -0,0 +1,71 @@
+"""
+ >>> grok.grok(__name__)
+ >>>
+ >>> cave = Cave()
+ >>> home = IHome(cave)
+ >>> IHome.providedBy(home)
+ True
+ >>>
+ >>> isinstance(home, Home)
+ True
+ >>> morehome = IMoreHome(cave)
+ >>> IHome.providedBy(morehome)
+ True
+ >>> isinstance(morehome, Home)
+ True
+ >>> yetanotherhome = IYetAnotherHome(cave)
+ >>> IHome.providedBy(yetanotherhome)
+ True
+ >>> isinstance(yetanotherhome, Home)
+ True
+
+ >>> from grok.tests.adapter import noarguments_fixture
+ Traceback (most recent call last):
+ ...
+ GrokImportError: @grok.adapter requires at least one argument.
+
+ >>> from grok.tests.adapter import functionasargument_fixture
+ Traceback (most recent call last):
+ ...
+ GrokImportError: @grok.adapter requires at least one argument.
+
+"""
+
+import grok
+from zope import interface
+
+class IDummy(interface.Interface):
+ pass
+
+class ICave(interface.Interface):
+ pass
+
+class IHome(interface.Interface):
+ pass
+
+class IMoreHome(interface.Interface):
+ pass
+
+class IYetAnotherHome(interface.Interface):
+ pass
+
+class Cave(grok.Model):
+ grok.implements(ICave)
+ pass
+
+class Home(object):
+ grok.implements(IHome)
+
+ at grok.adapter(Cave)
+ at grok.implementer(IHome)
+def home_for_cave(cave):
+ return Home()
+
+ at grok.adapter(ICave)
+ at grok.implementer(IMoreHome)
+def more_home_for_cave(cave):
+ return Home()
+
+ at grok.implementer(IYetAnotherHome)
+def yet_another_home_for_cave(cave):
+ return Home()
Deleted: grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py
===================================================================
--- grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py 2007-07-03 01:38:47 UTC (rev 77318)
+++ grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py 2007-07-03 01:53:02 UTC (rev 77319)
@@ -1,10 +0,0 @@
-import grok
-from zope import interface
-
-class IDummy(interface.Interface):
- pass
-
- at grok.adapter
- at grok.implementer(IDummy)
-def decorator_called_with_function_as_argument(cave):
- pass
Copied: grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py (from rev 77318, grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py)
===================================================================
--- grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py (rev 0)
+++ grok/branches/darrylcousins-branch/src/grok/tests/adapter/functionasargument_fixture.py 2007-07-03 01:53:02 UTC (rev 77319)
@@ -0,0 +1,10 @@
+import grok
+from zope import interface
+
+class IDummy(interface.Interface):
+ pass
+
+ at grok.adapter
+ at grok.implementer(IDummy)
+def decorator_called_with_function_as_argument(cave):
+ pass
Deleted: grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py
===================================================================
--- grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py 2007-07-03 01:38:47 UTC (rev 77318)
+++ grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py 2007-07-03 01:53:02 UTC (rev 77319)
@@ -1,10 +0,0 @@
-import grok
-from zope import interface
-
-class IDummy(interface.Interface):
- pass
-
- at grok.adapter()
- at grok.implementer(IDummy)
-def decorator_called_with_no_arguments(cave):
- pass
Copied: grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py (from rev 77318, grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py)
===================================================================
--- grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py (rev 0)
+++ grok/branches/darrylcousins-branch/src/grok/tests/adapter/noarguments_fixture.py 2007-07-03 01:53:02 UTC (rev 77319)
@@ -0,0 +1,10 @@
+import grok
+from zope import interface
+
+class IDummy(interface.Interface):
+ pass
+
+ at grok.adapter()
+ at grok.implementer(IDummy)
+def decorator_called_with_no_arguments(cave):
+ pass
More information about the Checkins
mailing list