[Checkins]
SVN: zope.html/trunk/src/zope/html/ - avoid zc.testlayer;
there is no need for that
Fred L. Drake, Jr.
fdrake at gmail.com
Wed Oct 18 13:19:43 EDT 2006
Log message for revision 70789:
- avoid zc.testlayer; there is no need for that
- merge functional tests into tests.py
Changed:
U zope.html/trunk/src/zope/html/ftesting.zcml
D zope.html/trunk/src/zope/html/ntests.py
U zope.html/trunk/src/zope/html/tests.py
-=-
Modified: zope.html/trunk/src/zope/html/ftesting.zcml
===================================================================
--- zope.html/trunk/src/zope/html/ftesting.zcml 2006-10-18 17:02:01 UTC (rev 70788)
+++ zope.html/trunk/src/zope/html/ftesting.zcml 2006-10-18 17:19:42 UTC (rev 70789)
@@ -41,6 +41,6 @@
component="zope.security.simplepolicies.PermissiveSecurityPolicy"
/>
- <adapter factory=".ntests.requestToTZInfo"/>
+ <adapter factory=".tests.requestToTZInfo"/>
</configure>
Deleted: zope.html/trunk/src/zope/html/ntests.py
===================================================================
--- zope.html/trunk/src/zope/html/ntests.py 2006-10-18 17:02:01 UTC (rev 70788)
+++ zope.html/trunk/src/zope/html/ntests.py 2006-10-18 17:19:42 UTC (rev 70789)
@@ -1,34 +0,0 @@
-"""Test harness for zope.html functional tests.
-
-$Id: ntests.py 3259 2005-08-19 16:46:26Z gary $
-"""
-import os
-import unittest
-
-import pytz
-
-import zope.component
-import zope.interface.common.idatetime
-import zope.publisher.interfaces
-
-from zope.app.testing import functional
-
-import zc.testlayer.ftesting
-
-#### testing framework ####
-
- at zope.component.adapter(zope.publisher.interfaces.IRequest)
- at zope.interface.implementer(zope.interface.common.idatetime.ITZInfo)
-def requestToTZInfo(request):
- return pytz.timezone('US/Eastern')
-
-#### test setup ####
-
-EditableHtmlLayer = zc.testlayer.ftesting.FTestingLayer(
- os.path.join(os.path.split(__file__)[0], 'ftesting.zcml'),
- __name__, "EditableHtmlLayer")
-
-def test_suite():
- suite = functional.FunctionalDocFileSuite("browser.txt")
- suite.layer = EditableHtmlLayer
- return suite
Modified: zope.html/trunk/src/zope/html/tests.py
===================================================================
--- zope.html/trunk/src/zope/html/tests.py 2006-10-18 17:02:01 UTC (rev 70788)
+++ zope.html/trunk/src/zope/html/tests.py 2006-10-18 17:19:42 UTC (rev 70789)
@@ -3,16 +3,23 @@
"""
__docformat__ = "reStructuredText"
+import os
import unittest
from zope.testing import doctest
+import pytz
+
import zope.annotation.attribute
import zope.app.form.browser.tests.test_textareawidget
import zope.app.testing.placelesssetup
import zope.component
+import zope.interface.common.idatetime
import zope.mimetype.types
+import zope.publisher.interfaces
+from zope.app.testing import functional
+
import zope.html.widget
@@ -34,7 +41,19 @@
zope.app.testing.placelesssetup.tearDown()
+ at zope.component.adapter(zope.publisher.interfaces.IRequest)
+ at zope.interface.implementer(zope.interface.common.idatetime.ITZInfo)
+def requestToTZInfo(request):
+ return pytz.timezone('US/Eastern')
+
+EditableHtmlLayer = functional.ZCMLLayer(
+ os.path.join(os.path.dirname(__file__), 'ftesting.zcml'),
+ __name__, "EditableHtmlLayer")
+
+
def test_suite():
+ ftests = functional.FunctionalDocFileSuite("browser.txt")
+ ftests.layer = EditableHtmlLayer
return unittest.TestSuite([
doctest.DocFileSuite(
"docinfo.txt",
@@ -44,4 +63,5 @@
"widget.txt",
optionflags=(doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE)),
unittest.makeSuite(FckeditorWidgetTestCase),
+ ftests,
])
More information about the Checkins
mailing list