[Checkins] SVN: zope.schema/trunk/ Prefer the standard libraries doctest module to the one from zope.testing.

Hanno Schlichting hannosch at hannosch.eu
Fri Apr 30 17:41:25 EDT 2010


Log message for revision 111756:
  Prefer the standard libraries doctest module to the one from zope.testing.
  

Changed:
  U   zope.schema/trunk/CHANGES.txt
  U   zope.schema/trunk/src/zope/schema/tests/test_docs.py
  U   zope.schema/trunk/src/zope/schema/tests/test_field.py

-=-
Modified: zope.schema/trunk/CHANGES.txt
===================================================================
--- zope.schema/trunk/CHANGES.txt	2010-04-30 21:38:20 UTC (rev 111755)
+++ zope.schema/trunk/CHANGES.txt	2010-04-30 21:41:24 UTC (rev 111756)
@@ -5,9 +5,8 @@
 3.6.3 (unreleased)
 ------------------
 
-- Nothing changed yet.
+- Prefer the standard libraries doctest module to the one from zope.testing.
 
-
 3.6.2 (2010-04-30)
 ------------------
 

Modified: zope.schema/trunk/src/zope/schema/tests/test_docs.py
===================================================================
--- zope.schema/trunk/src/zope/schema/tests/test_docs.py	2010-04-30 21:38:20 UTC (rev 111755)
+++ zope.schema/trunk/src/zope/schema/tests/test_docs.py	2010-04-30 21:41:24 UTC (rev 111756)
@@ -15,10 +15,12 @@
 
 $Id$
 """
-import unittest
+import doctest
 import re
-from zope.testing import doctest, renormalizing
+import unittest
 
+from zope.testing import renormalizing
+
 def test_suite():
     checker = renormalizing.RENormalizing([
         (re.compile(r"\[\(None, Invalid\('8<=10',\)\)\]"),
@@ -32,6 +34,3 @@
             '../validation.txt', checker=checker,
             optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS),
         ))
-
-if __name__ == '__main__':
-    unittest.main(default='test_suite')

Modified: zope.schema/trunk/src/zope/schema/tests/test_field.py
===================================================================
--- zope.schema/trunk/src/zope/schema/tests/test_field.py	2010-04-30 21:38:20 UTC (rev 111755)
+++ zope.schema/trunk/src/zope/schema/tests/test_field.py	2010-04-30 21:41:24 UTC (rev 111756)
@@ -15,13 +15,15 @@
 
 $Id$
 """
+
 import re
 
-from unittest import TestCase, TestSuite, main, makeSuite
+from doctest import DocTestSuite
+from unittest import TestCase, TestSuite, makeSuite
+
 from zope.schema import Field, Text, Int
 from zope.schema.interfaces import ValidationError, RequiredMissing
 from zope.schema.interfaces import ConstraintNotSatisfied
-from zope.testing.doctest import DocTestSuite
 from zope.testing import renormalizing
 
 class FieldTestBase(TestCase):
@@ -149,6 +151,3 @@
         DocTestSuite("zope.schema._field"),
         DocTestSuite("zope.schema._bootstrapfields",checker=checker),
         ))
-
-if __name__ == '__main__':
-    main(defaultTest='test_suite')



More information about the checkins mailing list