[Zope3-checkins] SVN: Zope3/trunk/src/zope/formlib/ merge ftests into tests

Bernd Dorn bernd.dorn at lovelysystems.com
Tue Mar 27 06:04:35 EDT 2007


Log message for revision 73707:
  merge ftests into tests

Changed:
  D   Zope3/trunk/src/zope/formlib/ftests.py
  U   Zope3/trunk/src/zope/formlib/tests.py

-=-
Deleted: Zope3/trunk/src/zope/formlib/ftests.py
===================================================================
--- Zope3/trunk/src/zope/formlib/ftests.py	2007-03-27 09:53:22 UTC (rev 73706)
+++ Zope3/trunk/src/zope/formlib/ftests.py	2007-03-27 10:04:34 UTC (rev 73707)
@@ -1,30 +0,0 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Corporation and Contributors. All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
-# FOR A PARTICULAR PURPOSE.
-#
-##############################################################################
-"""Functional tests for zope.formlib
-
-"""
-__docformat__ = "reStructuredText"
-
-import os
-import unittest
-
-from zope.app.testing import functional
-
-FormlibLayer = functional.ZCMLLayer(
-    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
-    __name__, 'FormlibLayer', allow_teardown=True)
-
-def test_suite():
-    errors = functional.FunctionalDocFileSuite("errors.txt")
-    errors.layer = FormlibLayer
-    return unittest.TestSuite((errors,))

Modified: Zope3/trunk/src/zope/formlib/tests.py
===================================================================
--- Zope3/trunk/src/zope/formlib/tests.py	2007-03-27 09:53:22 UTC (rev 73706)
+++ Zope3/trunk/src/zope/formlib/tests.py	2007-03-27 10:04:34 UTC (rev 73707)
@@ -15,6 +15,7 @@
 $Id$
 """
 import unittest
+import os
 import pytz
 
 from zope import component, interface
@@ -31,8 +32,17 @@
 import zope.app.form.browser.interfaces
 import zope.app.form.interfaces
 
+from zope.app.testing import functional
+
+
 from zope.formlib import interfaces, namedtemplate, form
 
+FormlibLayer = functional.ZCMLLayer(
+    os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
+    __name__, 'FormlibLayer', allow_teardown=True)
+
+
+
 @interface.implementer(zope.interface.common.idatetime.ITZInfo)
 @component.adapter(zope.publisher.interfaces.IRequest)
 def requestToTZInfo(request):
@@ -470,6 +480,8 @@
 
 def test_suite():
     from zope.testing import doctest
+    errors = functional.FunctionalDocFileSuite("errors.txt")
+    errors.layer = FormlibLayer
     return unittest.TestSuite((
         doctest.DocFileSuite(
             'form.txt',
@@ -484,7 +496,8 @@
             setUp=pageSetUp, tearDown=zope.component.testing.tearDown,
             ),
         doctest.DocTestSuite(
-            'zope.formlib.errors')
+            'zope.formlib.errors'),
+        errors,
         ))
 
 if __name__ == '__main__':



More information about the Zope3-Checkins mailing list