[Zope3-checkins] SVN: zope.formlib/branches/faassen-zaf/ Use standard library doctest instead of zope.testing's doctest. This

Martijn Faassen faassen at startifact.com
Wed Dec 30 18:04:55 EST 2009


Log message for revision 107403:
  Use standard library doctest instead of zope.testing's doctest. This
  changes the counting of tests, but they appear to be still executed..
  

Changed:
  U   zope.formlib/branches/faassen-zaf/buildout.cfg
  U   zope.formlib/branches/faassen-zaf/setup.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/form.txt
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_browserwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_checkboxwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_datetimewidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_datewidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_decimalwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_displaywidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_exception.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_filewidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_floatwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_formlib.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_intwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_multicheckboxwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_objectwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_passwordwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_radiowidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_registrations.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_sequencewidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_source.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_textareawidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_textwidget.py
  U   zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_widget.py

-=-
Modified: zope.formlib/branches/faassen-zaf/buildout.cfg
===================================================================
--- zope.formlib/branches/faassen-zaf/buildout.cfg	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/buildout.cfg	2009-12-30 23:04:54 UTC (rev 107403)
@@ -1,7 +1,11 @@
 [buildout]
 develop = . ../zope.app.form
 parts = test python
+versions = versions
 
+[versions]
+zope.testing = 3.8.4
+
 [test]
 recipe = zc.recipe.testrunner
 eggs = zope.formlib [test]

Modified: zope.formlib/branches/faassen-zaf/setup.py
===================================================================
--- zope.formlib/branches/faassen-zaf/setup.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/setup.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -26,7 +26,7 @@
 def read(*rnames):
     return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
 
-version = '3.10.1dev'
+version = '4.0dev'
 
 setup(name='zope.formlib',
       version=version,

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/form.txt
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/form.txt	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/form.txt	2009-12-30 23:04:54 UTC (rev 107403)
@@ -146,7 +146,7 @@
 Of course, we don't just want to display inputs.  We want to get the
 input data.  We can use getWidgetsData for that:
 
-    >>> from zope.testing.doctestunit import pprint
+    >>> from pprint import pprint
     >>> class MyForm:
     ...     form_fields = form.Fields(IOrder, omit_readonly=True)
     ...

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_browserwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_browserwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_browserwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -20,7 +20,7 @@
 from zope.interface import Interface, implements
 from zope.publisher.browser import TestRequest
 from zope.schema import Text, Int
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
 
 from zope.formlib.widget import SimpleInputWidget
 from zope.formlib.interfaces import ConversionError

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_checkboxwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_checkboxwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_checkboxwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -16,7 +16,7 @@
 $Id$
 """
 import unittest
-from zope.testing import doctest
+import doctest
 from zope.formlib.interfaces import IInputWidget
 from zope.formlib.widgets import CheckBoxWidget
 from zope.publisher.browser import TestRequest

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_datetimewidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_datetimewidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_datetimewidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -17,7 +17,7 @@
 """
 import datetime
 import unittest
-from zope.testing import doctest
+import doctest
 
 from zope.schema import Datetime
 from zope.datetime import parseDatetimetz, tzinfo

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_datewidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_datewidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_datewidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -17,7 +17,7 @@
 """
 import datetime
 import unittest
-from zope.testing import doctest
+import doctest
 from zope.datetime import parseDatetimetz
 from zope.schema import Date
 from zope.interface.verify import verifyClass
@@ -33,7 +33,7 @@
     """Documents and tests the date widget.
 
         >>> verifyClass(IInputWidget, DateWidget)
-        True
+        True        
     """
 
     _FieldFactory = Date

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_decimalwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_decimalwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_decimalwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -17,7 +17,7 @@
 """
 import unittest
 import decimal
-from zope.testing import doctest
+import doctest
 from zope.formlib.tests.test_browserwidget import SimpleInputWidgetTest
 from zope.formlib.interfaces import IInputWidget
 from zope.formlib.widgets import DecimalWidget

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_displaywidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_displaywidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_displaywidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -20,7 +20,7 @@
 from zope.interface.exceptions import DoesNotImplement
 from zope.publisher.browser import TestRequest
 from zope.schema import TextLine
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
 
 from zope.formlib.widget import DisplayWidget, UnicodeDisplayWidget
 

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_exception.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_exception.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_exception.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -16,7 +16,7 @@
 $Id$
 """
 import unittest
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
 
 def test_suite():
     return unittest.TestSuite((

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_filewidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_filewidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_filewidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -17,7 +17,7 @@
 """
 import unittest
 
-from zope.testing import doctest
+import doctest
 from StringIO import StringIO
 from zope.formlib.interfaces import IInputWidget
 from zope.formlib.widgets import FileWidget

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_floatwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_floatwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_floatwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -16,7 +16,7 @@
 $Id$
 """
 import unittest
-from zope.testing import doctest
+import doctest
 from zope.formlib.tests.test_browserwidget import SimpleInputWidgetTest
 from zope.formlib.interfaces import IInputWidget
 from zope.formlib.widgets import FloatWidget

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_formlib.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_formlib.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_formlib.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -533,7 +533,7 @@
 
 
 def test_suite():
-    from zope.testing import doctest
+    import doctest
     checker = zope.testing.renormalizing.RENormalizing([
       (re.compile(r"\[WidgetInputError\('form.summary', 'summary', ValidationError\('A error message'\)\)\]"),
                   r"[<zope.formlib.interfaces.WidgetInputError instance at ...>]"),

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_intwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_intwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_intwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -16,7 +16,7 @@
 $Id$
 """
 import unittest
-from zope.testing import doctest
+import doctest
 from unittest import main, makeSuite
 from zope.formlib.tests.test_browserwidget import SimpleInputWidgetTest
 from zope.formlib.interfaces import IInputWidget

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_multicheckboxwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_multicheckboxwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_multicheckboxwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -16,7 +16,7 @@
 $Id$
 """
 import unittest
-from zope.testing import doctest
+import doctest
 from zope.interface import Interface, implements
 from zope.publisher.browser import TestRequest
 from zope.schema import Choice, List

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_objectwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_objectwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_objectwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -22,7 +22,7 @@
 from zope.publisher.browser import TestRequest
 from zope.schema import Object, TextLine
 from zope.schema.interfaces import ITextLine
-from zope.testing import doctest
+import doctest
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
 from zope.component import provideAdapter
 

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_passwordwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_passwordwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_passwordwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -16,7 +16,7 @@
 $Id$
 """
 import unittest
-from zope.testing import doctest
+import doctest
 from zope.formlib.interfaces import IInputWidget
 from zope.formlib.widgets import PasswordWidget
 from zope.formlib.tests.test_browserwidget import SimpleInputWidgetTest

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_radiowidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_radiowidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_radiowidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -16,7 +16,7 @@
 $Id$
 """
 import unittest
-from zope.testing import doctest
+import doctest
 from zope.interface import Interface, implements
 from zope.interface.verify import verifyClass
 from zope.publisher.browser import TestRequest

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_registrations.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_registrations.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_registrations.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -21,7 +21,7 @@
 from zope.configuration import xmlconfig
 from zope.interface import implements
 from zope.publisher.browser import TestRequest
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
 
 from zope.component import testing
 # import all widgets (in this case, importing * is ok, since we

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_sequencewidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_sequencewidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_sequencewidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -22,7 +22,7 @@
 from zope.component import provideAdapter
 from zope.publisher.browser import TestRequest
 from zope.publisher.interfaces.browser import IDefaultBrowserLayer
-from zope.testing import doctest
+import doctest
 
 from zope.formlib.widgets import TextWidget, ObjectWidget, DisplayWidget
 from zope.formlib.widgets import TupleSequenceWidget, ListSequenceWidget

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_source.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_source.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_source.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -18,7 +18,7 @@
 from zope.component import testing
 
 def test_suite():
-    from zope.testing import doctest
+    import doctest
     return doctest.DocFileSuite(
         '../source.txt',
         setUp=testing.setUp, tearDown=testing.tearDown)

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_textareawidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_textareawidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_textareawidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -16,7 +16,7 @@
 $Id$
 """
 import unittest
-from zope.testing import doctest
+import doctest
 from zope.formlib.interfaces import IInputWidget
 from zope.formlib.widgets import TextAreaWidget
 from zope.formlib.tests.test_browserwidget import SimpleInputWidgetTest

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_textwidget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_textwidget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_textwidget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -17,7 +17,7 @@
 """
 import datetime
 import unittest
-from zope.testing import doctest
+import doctest
 from zope.component.testing import setUp, tearDown
 from zope.interface.verify import verifyClass
 from zope.schema import TextLine

Modified: zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_widget.py
===================================================================
--- zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_widget.py	2009-12-30 22:59:06 UTC (rev 107402)
+++ zope.formlib/branches/faassen-zaf/src/zope/formlib/tests/test_widget.py	2009-12-30 23:04:54 UTC (rev 107403)
@@ -19,7 +19,7 @@
 
 from zope.component.testing import setUp, tearDown
 from zope.publisher.browser import TestRequest
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
 
 from zope.formlib.widget import Widget
 



More information about the Zope3-Checkins mailing list