[Zope-Checkins]
SVN: Products.Five/branches/philikon-local-components/tests/test_i18n.py
don't even use zopetestcase (die, bitch, die)
Philipp von Weitershausen
philikon at philikon.de
Wed Apr 19 13:48:43 EDT 2006
Log message for revision 67160:
don't even use zopetestcase (die, bitch, die)
cosmetics on test setup
Changed:
U Products.Five/branches/philikon-local-components/tests/test_i18n.py
-=-
Modified: Products.Five/branches/philikon-local-components/tests/test_i18n.py
===================================================================
--- Products.Five/branches/philikon-local-components/tests/test_i18n.py 2006-04-19 17:44:19 UTC (rev 67159)
+++ Products.Five/branches/philikon-local-components/tests/test_i18n.py 2006-04-19 17:48:42 UTC (rev 67160)
@@ -19,15 +19,13 @@
if __name__ == '__main__':
execfile(os.path.join(sys.path[0], 'framework.py'))
+from zope.component.testing import setUp, tearDown
+
def test_directive():
"""
- Test the i18n directive
+ Test the i18n directive. First, we need to register the ZCML
+ directive:
- >>> from zope.component.testing import setUp, tearDown
- >>> setUp()
-
- First, we need to register the ZCML directive:
-
>>> import zope.i18n
>>> from Products.Five import zcml
>>> zcml.load_config('meta.zcml', zope.i18n)
@@ -56,16 +54,11 @@
u'This is an explicit message'
>>> translate(msg, target_language='de')
u'Dies ist eine explizite Nachricht'
-
-
- Clean up:
-
- >>> tearDown()
"""
def test_suite():
- from Testing.ZopeTestCase import ZopeDocTestSuite
- return ZopeDocTestSuite()
+ from zope.testing.doctest import DocTestSuite
+ return DocTestSuite(setUp=setUp, tearDown=tearDown)
if __name__ == '__main__':
framework()
More information about the Zope-Checkins
mailing list