[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/apidoc/zcmlmodule/
Fixed tests that I broke with the last checkin. I totally
forgot to run
Stephan Richter
srichter at cosmos.phy.tufts.edu
Tue Jul 13 15:04:10 EDT 2004
Log message for revision 26505:
Fixed tests that I broke with the last checkin. I totally forgot to run
these before the checkin.
Changed:
U Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py
U Zope3/trunk/src/zope/app/apidoc/zcmlmodule/tests.py
-=-
Modified: Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py 2004-07-13 18:44:46 UTC (rev 26504)
+++ Zope3/trunk/src/zope/app/apidoc/zcmlmodule/__init__.py 2004-07-13 19:04:10 UTC (rev 26505)
@@ -68,6 +68,8 @@
Demonstration::
+ >>> module = ZCMLModule()
+ >>> module._makeDocStructure()
>>> ns = Namespace(ZCMLModule(), 'http://namespaces.zope.org/browser')
>>> ns.getShortName()
Modified: Zope3/trunk/src/zope/app/apidoc/zcmlmodule/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/zcmlmodule/tests.py 2004-07-13 18:44:46 UTC (rev 26504)
+++ Zope3/trunk/src/zope/app/apidoc/zcmlmodule/tests.py 2004-07-13 19:04:10 UTC (rev 26505)
@@ -15,17 +15,18 @@
$Id$
"""
+import os
import unittest
from zope.testing.doctestunit import DocTestSuite
from zope.app.tests import placelesssetup, ztapi
from zope.app.apidoc.tests import Root
+import zope.app.appsetup.appsetup
+from zope.app.location.traversing import LocationPhysicallyLocatable
+from zope.app.traversing.interfaces import IPhysicallyLocatable
from zope.app.tree.interfaces import IUniqueId
from zope.app.tree.adapters import LocationUniqueId
-from zope.app.traversing.interfaces import IPhysicallyLocatable
-from zope.app.location.traversing import LocationPhysicallyLocatable
-
from zope.app.apidoc.zcmlmodule import Namespace, Directive
from zope.app.apidoc.zcmlmodule import ZCMLModule
from zope.app.apidoc.tests import Root
@@ -38,8 +39,15 @@
ztapi.provideAdapter(None, IPhysicallyLocatable,
LocationPhysicallyLocatable)
+ # Fix up path for tests.
+ global old_source_file
+ old_source_file = zope.app.appsetup.appsetup.__config_source
+ zope.app.appsetup.appsetup.__config_source = os.path.join(
+ os.path.dirname(zope.app.__file__), 'meta.zcml')
+
def tearDown():
placelesssetup.tearDown()
+ zope.app.appsetup.appsetup.__config_source = old_source_file
def getDirective():
module = ZCMLModule()
@@ -54,7 +62,8 @@
def test_suite():
return unittest.TestSuite((
- DocTestSuite('zope.app.apidoc.zcmlmodule'),
+ DocTestSuite('zope.app.apidoc.zcmlmodule',
+ setUp=setUp, tearDown=tearDown),
DocTestSuite('zope.app.apidoc.zcmlmodule.browser',
setUp=setUp, tearDown=tearDown),
))
More information about the Zope3-Checkins
mailing list