[Checkins] SVN: Zope3/trunk/src/zope/app/zcmlfiles/tests.py move out zcml test from zope.app.testing to zope.app.zcmlfiles

Bernd Dorn bernd.dorn at lovelysystems.com
Sun Mar 25 07:08:55 EDT 2007


Log message for revision 73587:
  move out zcml test from zope.app.testing to zope.app.zcmlfiles

Changed:
  A   Zope3/trunk/src/zope/app/zcmlfiles/tests.py

-=-
Added: Zope3/trunk/src/zope/app/zcmlfiles/tests.py
===================================================================
--- Zope3/trunk/src/zope/app/zcmlfiles/tests.py	2007-03-25 11:08:28 UTC (rev 73586)
+++ Zope3/trunk/src/zope/app/zcmlfiles/tests.py	2007-03-25 11:08:54 UTC (rev 73587)
@@ -0,0 +1,36 @@
+import unittest
+from zope.testing.doctestunit import DocTestSuite
+
+def test_include():
+    """
+    >>> from zope.configuration import xmlconfig, config
+    >>> context = config.ConfigurationMachine()
+    >>> xmlconfig.registerCommonDirectives(context)
+    >>> import zope.app.zcmlfiles
+
+    >>> import warnings
+    >>> showwarning = warnings.showwarning
+    >>> warnings.showwarning = lambda *a, **k: None
+
+    >>> xmlconfig.include(context, package=zope.app.zcmlfiles)
+
+    >>> xmlconfig.include(context, 'configure.zcml', zope.app.zcmlfiles)
+    >>> xmlconfig.include(context, 'ftesting.zcml', zope.app.zcmlfiles)
+    >>> xmlconfig.include(context, 'menus.zcml', zope.app.zcmlfiles)
+    >>> xmlconfig.include(context, 'meta.zcml', zope.app.zcmlfiles)
+    >>> xmlconfig.include(context,
+    ...     'file_not_exists.zcml', zope.app.zcmlfiles) #doctest: +ELLIPSIS
+    Traceback (most recent call last):
+    ...
+    IOError: ...
+
+    >>> warnings.showwarning = showwarning
+    """
+
+def test_suite():
+    return unittest.TestSuite((
+        DocTestSuite(),
+        ))
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')


Property changes on: Zope3/trunk/src/zope/app/zcmlfiles/tests.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native



More information about the Checkins mailing list