[Checkins] SVN: Zope3/branches/jinty-zodbless/src/zope/app/twisted/tests/test_schema.py Convert test to doctest.

Brian Sutherland jinty at web.de
Mon Apr 9 17:23:11 EDT 2007


Log message for revision 74062:
  Convert test to doctest.

Changed:
  U   Zope3/branches/jinty-zodbless/src/zope/app/twisted/tests/test_schema.py

-=-
Modified: Zope3/branches/jinty-zodbless/src/zope/app/twisted/tests/test_schema.py
===================================================================
--- Zope3/branches/jinty-zodbless/src/zope/app/twisted/tests/test_schema.py	2007-04-09 21:10:32 UTC (rev 74061)
+++ Zope3/branches/jinty-zodbless/src/zope/app/twisted/tests/test_schema.py	2007-04-09 21:23:10 UTC (rev 74062)
@@ -16,22 +16,26 @@
 $Id$
 """
 
-import os.path
-import unittest
+import os
+import doctest
 
 import ZConfig
 
+def test_schema(self):
+    """Test the ZConfig schema.
 
-class TestConfiguration(unittest.TestCase):
+    Test that it loads:
 
-    def test_schema(self):
-        dir = os.path.dirname(os.path.dirname(__file__))
-        filename = os.path.join(dir, "schema.xml")
-        ZConfig.loadSchema(filename)
+        >>> dir = os.path.dirname(os.path.dirname(__file__))
+        >>> filename = os.path.join(dir, "schema.xml")
+        >>> ZConfig.loadSchema(filename)
+        <ZConfig.info.SchemaType instance at ...>
+    """
 
-
 def test_suite():
-    return unittest.makeSuite(TestConfiguration)
+    return doctest.DocTestSuite(
+        optionflags=doctest.ELLIPSIS | doctest.NORMALIZE_WHITESPACE,
+        )
 
 if __name__ == "__main__":
     try:



More information about the Checkins mailing list