[Checkins] SVN: grok/trunk/src/grok/tests/ moved tests zcml into
their own directory
Wolfgang Schnerring
wosc at wosc.de
Wed Oct 18 06:42:38 EDT 2006
Log message for revision 70774:
moved tests zcml into their own directory
Changed:
D grok/trunk/src/grok/tests/scan/directiveerror.py
D grok/trunk/src/grok/tests/scan/directiveimporterror.py
D grok/trunk/src/grok/tests/scan/directiveimporterror_fixture.py
D grok/trunk/src/grok/tests/scan/directivemodule.py
D grok/trunk/src/grok/tests/scan/directivepackage.py
U grok/trunk/src/grok/tests/test_grok.py
A grok/trunk/src/grok/tests/zcml/
A grok/trunk/src/grok/tests/zcml/__init__.py
A grok/trunk/src/grok/tests/zcml/directiveerror.py
A grok/trunk/src/grok/tests/zcml/directiveimporterror.py
A grok/trunk/src/grok/tests/zcml/directiveimporterror_fixture.py
A grok/trunk/src/grok/tests/zcml/directivemodule.py
A grok/trunk/src/grok/tests/zcml/directivepackage.py
-=-
Deleted: grok/trunk/src/grok/tests/scan/directiveerror.py
===================================================================
--- grok/trunk/src/grok/tests/scan/directiveerror.py 2006-10-18 10:05:58 UTC (rev 70773)
+++ grok/trunk/src/grok/tests/scan/directiveerror.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -1,25 +0,0 @@
-"""
-When a GrokImportError occurs, ZCML will give the proper stack trace:
-
- >>> import grok
- >>> from zope.configuration import xmlconfig
- >>> context = xmlconfig.file('meta.zcml', grok)
-
- >>> ignored = xmlconfig.string('''
- ... <configure
- ... xmlns="http://namespaces.zope.org/zope"
- ... xmlns:grok="http://namespaces.zope.org/grok"
- ... >
- ... <grok:grok package="grok.tests.scan.directiveerror"/>
- ... </configure>''', context=context)
- Traceback (most recent call last):
- ...
- ZopeXMLConfigurationError: File "...", line ...
- GrokError: No module-level context for
- <class 'grok.tests.scan.directiveerror.CavePainting'>, please use grok.context.
-
-"""
-import grok
-
-class CavePainting(grok.View):
- pass
Deleted: grok/trunk/src/grok/tests/scan/directiveimporterror.py
===================================================================
--- grok/trunk/src/grok/tests/scan/directiveimporterror.py 2006-10-18 10:05:58 UTC (rev 70773)
+++ grok/trunk/src/grok/tests/scan/directiveimporterror.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -1,19 +0,0 @@
-"""
-When a GrokImportError occurs, ZCML will give the proper stack trace:
-
- >>> import grok
- >>> from zope.configuration import xmlconfig
- >>> context = xmlconfig.file('meta.zcml', grok)
-
- >>> ignored = xmlconfig.string('''
- ... <configure
- ... xmlns="http://namespaces.zope.org/zope"
- ... xmlns:grok="http://namespaces.zope.org/grok"
- ... >
- ... <grok:grok package="grok.tests.scan.directiveimporterror_fixture"/>
- ... </configure>''', context=context)
- Traceback (most recent call last):
- ...
- ZopeXMLConfigurationError: File "...", line ...
- GrokImportError: grok.template can only be used on class level.
-"""
Deleted: grok/trunk/src/grok/tests/scan/directiveimporterror_fixture.py
===================================================================
--- grok/trunk/src/grok/tests/scan/directiveimporterror_fixture.py 2006-10-18 10:05:58 UTC (rev 70773)
+++ grok/trunk/src/grok/tests/scan/directiveimporterror_fixture.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -1,5 +0,0 @@
-"""
-This will raise a GrokImportError
-"""
-import grok
-grok.template('invalid')
Deleted: grok/trunk/src/grok/tests/scan/directivemodule.py
===================================================================
--- grok/trunk/src/grok/tests/scan/directivemodule.py 2006-10-18 10:05:58 UTC (rev 70773)
+++ grok/trunk/src/grok/tests/scan/directivemodule.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -1,28 +0,0 @@
-"""
- >>> import grok
- >>> from zope.configuration import xmlconfig
- >>> context = xmlconfig.file('meta.zcml', grok)
-
- >>> ignored = xmlconfig.string('''
- ... <configure
- ... xmlns="http://namespaces.zope.org/zope"
- ... xmlns:grok="http://namespaces.zope.org/grok"
- ... >
- ... <grok:grok package="grok.tests.scan.stoneage.cave"/>
- ... </configure>''', context=context)
-
- >>> from grok.tests.scan.stoneage.cave import Cave
- >>> cave = Cave()
-
- >>> from zope.publisher.browser import TestRequest
- >>> request = TestRequest()
- >>> from zope import component
-
- >>> view = component.getMultiAdapter((cave, request), name='index')
- >>> print view()
- <html>
- <body>
- <h1>A comfy cave</h1>
- </body>
- </html>
-"""
Deleted: grok/trunk/src/grok/tests/scan/directivepackage.py
===================================================================
--- grok/trunk/src/grok/tests/scan/directivepackage.py 2006-10-18 10:05:58 UTC (rev 70773)
+++ grok/trunk/src/grok/tests/scan/directivepackage.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -1,38 +0,0 @@
-"""
- >>> import grok
- >>> from zope.configuration import xmlconfig
- >>> context = xmlconfig.file('meta.zcml', grok)
-
- >>> ignored = xmlconfig.string('''
- ... <configure
- ... xmlns="http://namespaces.zope.org/zope"
- ... xmlns:grok="http://namespaces.zope.org/grok"
- ... >
- ... <grok:grok package="grok.tests.scan.stoneage"/>
- ... </configure>''', context=context)
-
- >>> from grok.tests.scan.stoneage.cave import Cave
- >>> from grok.tests.scan.stoneage.hunt.mammoth import Mammoth
- >>> manfred = Mammoth()
- >>> cave = Cave()
-
- >>> from zope.publisher.browser import TestRequest
- >>> request = TestRequest()
- >>> from zope import component
-
- >>> view = component.getMultiAdapter((cave, request), name='index')
- >>> print view()
- <html>
- <body>
- <h1>A comfy cave</h1>
- </body>
- </html>
-
- >>> view = component.getMultiAdapter((manfred, request), name='index')
- >>> print view()
- <html>
- <body>
- <h1>ME GROK HUNT MAMMOTH!</h1>
- </body>
- </html>
-"""
\ No newline at end of file
Modified: grok/trunk/src/grok/tests/test_grok.py
===================================================================
--- grok/trunk/src/grok/tests/test_grok.py 2006-10-18 10:05:58 UTC (rev 70773)
+++ grok/trunk/src/grok/tests/test_grok.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -32,7 +32,8 @@
def test_suite():
suite = unittest.TestSuite()
- for name in ['adapter', 'error', 'view', 'security', 'scan', 'event']:
+ for name in ['adapter', 'error', 'view', 'security', 'scan',
+ 'event', 'zcml']:
suite.addTest(suiteFromPackage(name))
return suite
Added: grok/trunk/src/grok/tests/zcml/__init__.py
===================================================================
--- grok/trunk/src/grok/tests/zcml/__init__.py 2006-10-18 10:05:58 UTC (rev 70773)
+++ grok/trunk/src/grok/tests/zcml/__init__.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -0,0 +1 @@
+# this is a package
Copied: grok/trunk/src/grok/tests/zcml/directiveerror.py (from rev 70772, grok/trunk/src/grok/tests/scan/directiveerror.py)
===================================================================
--- grok/trunk/src/grok/tests/scan/directiveerror.py 2006-10-18 07:41:17 UTC (rev 70772)
+++ grok/trunk/src/grok/tests/zcml/directiveerror.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -0,0 +1,25 @@
+"""
+When a GrokImportError occurs, ZCML will give the proper stack trace:
+
+ >>> import grok
+ >>> from zope.configuration import xmlconfig
+ >>> context = xmlconfig.file('meta.zcml', grok)
+
+ >>> ignored = xmlconfig.string('''
+ ... <configure
+ ... xmlns="http://namespaces.zope.org/zope"
+ ... xmlns:grok="http://namespaces.zope.org/grok"
+ ... >
+ ... <grok:grok package="grok.tests.zcml.directiveerror"/>
+ ... </configure>''', context=context)
+ Traceback (most recent call last):
+ ...
+ ZopeXMLConfigurationError: File "...", line ...
+ GrokError: No module-level context for
+ <class 'grok.tests.zcml.directiveerror.CavePainting'>, please use grok.context.
+
+"""
+import grok
+
+class CavePainting(grok.View):
+ pass
Copied: grok/trunk/src/grok/tests/zcml/directiveimporterror.py (from rev 70772, grok/trunk/src/grok/tests/scan/directiveimporterror.py)
===================================================================
--- grok/trunk/src/grok/tests/scan/directiveimporterror.py 2006-10-18 07:41:17 UTC (rev 70772)
+++ grok/trunk/src/grok/tests/zcml/directiveimporterror.py 2006-10-18 10:42:37 UTC (rev 70774)
@@ -0,0 +1,19 @@
+"""
+When a GrokImportError occurs, ZCML will give the proper stack trace:
+
+ >>> import grok
+ >>> from zope.configuration import xmlconfig
+ >>> context = xmlconfig.file('meta.zcml', grok)
+
+ >>> ignored = xmlconfig.string('''
+ ... <configure
+ ... xmlns="http://namespaces.zope.org/zope"
+ ... xmlns:grok="http://namespaces.zope.org/grok"
+ ... >
+ ... <grok:grok package="grok.tests.zcml.directiveimporterror_fixture"/>
+ ... </configure>''', context=context)
+ Traceback (most recent call last):
+ ...
+ ZopeXMLConfigurationError: File "...", line ...
+ GrokImportError: grok.template can only be used on class level.
+"""
Copied: grok/trunk/src/grok/tests/zcml/directiveimporterror_fixture.py (from rev 70772, grok/trunk/src/grok/tests/scan/directiveimporterror_fixture.py)
Copied: grok/trunk/src/grok/tests/zcml/directivemodule.py (from rev 70772, grok/trunk/src/grok/tests/scan/directivemodule.py)
Copied: grok/trunk/src/grok/tests/zcml/directivepackage.py (from rev 70772, grok/trunk/src/grok/tests/scan/directivepackage.py)
More information about the Checkins
mailing list