[Checkins] SVN: z3c.pt/trunk/z3c/pt/ Moved component set up to
testrunner.
Malthe Borch
mborch at gmail.com
Mon Mar 17 05:57:52 EDT 2008
Log message for revision 84734:
Moved component set up to testrunner.
Changed:
U z3c.pt/trunk/z3c/pt/README.txt
U z3c.pt/trunk/z3c/pt/i18n.txt
U z3c.pt/trunk/z3c/pt/tests/test_doctests.py
U z3c.pt/trunk/z3c/pt/translation.txt
-=-
Modified: z3c.pt/trunk/z3c/pt/README.txt
===================================================================
--- z3c.pt/trunk/z3c/pt/README.txt 2008-03-17 09:53:11 UTC (rev 84733)
+++ z3c.pt/trunk/z3c/pt/README.txt 2008-03-17 09:57:51 UTC (rev 84734)
@@ -28,13 +28,6 @@
``ViewTextTemplate``, ``ViewTextTemplateFile``
See above.
-Setup
------
-
- >>> from zope.configuration.xmlconfig import XMLConfig
- >>> import z3c.pt
- >>> XMLConfig('configure.zcml', z3c.pt)()
-
Page template classes
---------------------
Modified: z3c.pt/trunk/z3c/pt/i18n.txt
===================================================================
--- z3c.pt/trunk/z3c/pt/i18n.txt 2008-03-17 09:53:11 UTC (rev 84733)
+++ z3c.pt/trunk/z3c/pt/i18n.txt 2008-03-17 09:57:51 UTC (rev 84734)
@@ -31,12 +31,6 @@
Translation of tag contents
---------------------------
-We'll first register the Python expression translator.
-
- >>> from z3c.pt.expressions import PythonTranslation
- >>> from zope.component import provideUtility
- >>> provideUtility(PythonTranslation(), name="python")
-
First, a simple example:
>>> body = """\
Modified: z3c.pt/trunk/z3c/pt/tests/test_doctests.py
===================================================================
--- z3c.pt/trunk/z3c/pt/tests/test_doctests.py 2008-03-17 09:53:11 UTC (rev 84733)
+++ z3c.pt/trunk/z3c/pt/tests/test_doctests.py 2008-03-17 09:57:51 UTC (rev 84734)
@@ -5,19 +5,28 @@
zope.testing.doctest.NORMALIZE_WHITESPACE)
import zope.component.testing
+import zope.configuration.xmlconfig
+import z3c.pt
+
+def setUp(suite):
+ zope.component.testing.setUp(suite)
+ zope.configuration.xmlconfig.XMLConfig('configure.zcml', z3c.pt)()
+
def test_suite():
- filesuites = ['README.txt', 'BENCHMARKS.txt', 'translation.txt', 'i18n.txt', 'codegen.txt']
- testsuites = ['z3c.pt.translation', 'z3c.pt.clauses', 'z3c.pt.expressions']
+ filesuites = ('README.txt', 'BENCHMARKS.txt', 'translation.txt', 'i18n.txt', 'codegen.txt')
+ testsuites = ('z3c.pt.translation', 'z3c.pt.clauses', 'z3c.pt.expressions')
return unittest.TestSuite(
- [zope.testing.doctest.DocTestSuite(doctest,
- optionflags=OPTIONFLAGS) for doctest in testsuites] +
- [zope.testing.doctest.DocFileSuite(doctest,
- optionflags=OPTIONFLAGS,
- setUp=zope.component.testing.setUp,
- tearDown=zope.component.testing.tearDown,
- package="z3c.pt") for doctest in filesuites]
+ [zope.testing.doctest.DocTestSuite(
+ doctest, optionflags=OPTIONFLAGS,
+ setUp=setUp, tearDown=zope.component.testing.tearDown) \
+ for doctest in testsuites] +
+
+ [zope.testing.doctest.DocFileSuite(
+ doctest, optionflags=OPTIONFLAGS,
+ setUp=setUp, tearDown=zope.component.testing.tearDown,
+ package="z3c.pt") for doctest in filesuites]
)
if __name__ == '__main__':
Modified: z3c.pt/trunk/z3c/pt/translation.txt
===================================================================
--- z3c.pt/trunk/z3c/pt/translation.txt 2008-03-17 09:53:11 UTC (rev 84733)
+++ z3c.pt/trunk/z3c/pt/translation.txt 2008-03-17 09:57:51 UTC (rev 84734)
@@ -11,19 +11,6 @@
... exec source in _globals, _locals
... return _locals['render'](**kwargs)
-Expressions
------------
-
-First we'll register the expression translation utilities:
-
- >>> from zope.component import provideUtility
-
- >>> from z3c.pt.expressions import PythonTranslation
- >>> provideUtility(PythonTranslation(), name="python")
-
- >>> from z3c.pt.expressions import PathTranslation
- >>> provideUtility(PathTranslation(), name="path")
-
TAL templates
-------------
More information about the Checkins
mailing list