[Zope-Checkins] SVN: Zope/trunk/ Use the standard libraries doctest module in favor of the deprecated version in zope.testing
Hanno Schlichting
hannosch at hannosch.eu
Sat Mar 27 13:41:31 EDT 2010
Log message for revision 110239:
Use the standard libraries doctest module in favor of the deprecated version in zope.testing
Changed:
U Zope/trunk/doc/CHANGES.rst
U Zope/trunk/src/AccessControl/tests/testZopeGuards.py
U Zope/trunk/src/AccessControl/tests/testZopeSecurityPolicy.py
U Zope/trunk/src/App/tests/test_class_init.py
U Zope/trunk/src/Missing/tests.py
U Zope/trunk/src/MultiMapping/tests.py
U Zope/trunk/src/OFS/tests/test_event.py
U Zope/trunk/src/Products/Five/browser/tests/test_decode.py
U Zope/trunk/src/Products/Five/browser/tests/test_i18n.py
U Zope/trunk/src/Products/Five/browser/tests/test_zope3security.py
U Zope/trunk/src/Products/Five/component/tests.py
U Zope/trunk/src/Products/Five/tests/test_i18n.py
U Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/__init__.py
U Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/functional.py
U Zope/trunk/src/ThreadLock/tests.py
U Zope/trunk/src/ZPublisher/tests/testBeforeTraverse.py
U Zope/trunk/src/ZPublisher/tests/testPublish.py
-=-
Modified: Zope/trunk/doc/CHANGES.rst
===================================================================
--- Zope/trunk/doc/CHANGES.rst 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/doc/CHANGES.rst 2010-03-27 17:41:31 UTC (rev 110239)
@@ -11,6 +11,9 @@
Restructuring
+++++++++++++
+- Use the standard libraries doctest module in favor of the deprecated version
+ in zope.testing.
+
- Finished the move of five.formlib to an extra package and removed it from
Zope 2 itself. Upgrade notes have been added to the news section of the
release notes.
Modified: Zope/trunk/src/AccessControl/tests/testZopeGuards.py
===================================================================
--- Zope/trunk/src/AccessControl/tests/testZopeGuards.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/AccessControl/tests/testZopeGuards.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -17,13 +17,13 @@
$Id$
"""
+import doctest
import unittest
import os
import operator
import sys
-from zope.testing import doctest
import ZODB
Modified: Zope/trunk/src/AccessControl/tests/testZopeSecurityPolicy.py
===================================================================
--- Zope/trunk/src/AccessControl/tests/testZopeSecurityPolicy.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/AccessControl/tests/testZopeSecurityPolicy.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -574,7 +574,7 @@
"""
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
def test_suite():
suite = unittest.TestSuite()
Modified: Zope/trunk/src/App/tests/test_class_init.py
===================================================================
--- Zope/trunk/src/App/tests/test_class_init.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/App/tests/test_class_init.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -31,7 +31,7 @@
>>> InitializeClass(C)
"""
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
import unittest
def test_suite():
Modified: Zope/trunk/src/Missing/tests.py
===================================================================
--- Zope/trunk/src/Missing/tests.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/Missing/tests.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -36,7 +36,7 @@
$Id$
"""
import unittest
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
def test_suite():
return unittest.TestSuite((
Modified: Zope/trunk/src/MultiMapping/tests.py
===================================================================
--- Zope/trunk/src/MultiMapping/tests.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/MultiMapping/tests.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -50,7 +50,7 @@
$Id$
"""
import unittest
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
def test_suite():
return unittest.TestSuite((
Modified: Zope/trunk/src/OFS/tests/test_event.py
===================================================================
--- Zope/trunk/src/OFS/tests/test_event.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/OFS/tests/test_event.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -83,6 +83,6 @@
def test_suite():
- from zope.testing.doctest import DocFileSuite
+ from doctest import DocFileSuite
return DocFileSuite('event.txt', package="OFS.tests",
setUp=setUp, tearDown=testing.tearDown)
Modified: Zope/trunk/src/Products/Five/browser/tests/test_decode.py
===================================================================
--- Zope/trunk/src/Products/Five/browser/tests/test_decode.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/Products/Five/browser/tests/test_decode.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -49,5 +49,5 @@
"""
def test_suite():
- from zope.testing.doctest import DocTestSuite
+ from doctest import DocTestSuite
return DocTestSuite()
Modified: Zope/trunk/src/Products/Five/browser/tests/test_i18n.py
===================================================================
--- Zope/trunk/src/Products/Five/browser/tests/test_i18n.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/Products/Five/browser/tests/test_i18n.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -86,5 +86,5 @@
def test_suite():
from Testing.ZopeTestCase import FunctionalDocTestSuite
- from zope.testing.doctest import ELLIPSIS
+ from doctest import ELLIPSIS
return FunctionalDocTestSuite(optionflags=ELLIPSIS)
Modified: Zope/trunk/src/Products/Five/browser/tests/test_zope3security.py
===================================================================
--- Zope/trunk/src/Products/Five/browser/tests/test_zope3security.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/Products/Five/browser/tests/test_zope3security.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -129,5 +129,5 @@
def test_suite():
from Testing.ZopeTestCase import FunctionalDocTestSuite
- from zope.testing.doctest import ELLIPSIS
+ from doctest import ELLIPSIS
return FunctionalDocTestSuite(optionflags=ELLIPSIS)
Modified: Zope/trunk/src/Products/Five/component/tests.py
===================================================================
--- Zope/trunk/src/Products/Five/component/tests.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/Products/Five/component/tests.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -16,7 +16,7 @@
$Id$
"""
import unittest
-from zope.testing.doctestunit import DocFileSuite
+from doctest import DocFileSuite
from Testing.ZopeTestCase import FunctionalDocFileSuite
__docformat__ = "reStructuredText"
Modified: Zope/trunk/src/Products/Five/tests/test_i18n.py
===================================================================
--- Zope/trunk/src/Products/Five/tests/test_i18n.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/Products/Five/tests/test_i18n.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -55,5 +55,5 @@
def test_suite():
- from zope.testing.doctest import DocTestSuite
+ from doctest import DocTestSuite
return DocTestSuite(setUp=setUp, tearDown=tearDown)
Modified: Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/__init__.py
===================================================================
--- Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/__init__.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/__init__.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -15,7 +15,5 @@
$Id$
"""
-from zope.testing.doctest import *
-from zope.testing.doctest import _normalize_module
+from doctest import *
from functional import *
-
Modified: Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/functional.py
===================================================================
--- Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/functional.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/Testing/ZopeTestCase/zopedoctest/functional.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -15,12 +15,14 @@
$Id$
"""
-import sys, re, base64
+import base64
+import doctest
+import re
+import sys
import warnings
+
import transaction
-from zope.testing import doctest
-
from Testing.ZopeTestCase import ZopeTestCase
from Testing.ZopeTestCase import FunctionalTestCase
from Testing.ZopeTestCase import Functional
@@ -93,7 +95,6 @@
def auth_header(header):
match = basicre.match(header)
if match:
- import base64
u, p = match.group(1, 2)
if u is None:
u = ''
Modified: Zope/trunk/src/ThreadLock/tests.py
===================================================================
--- Zope/trunk/src/ThreadLock/tests.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/ThreadLock/tests.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -57,7 +57,7 @@
import ThreadLock, threading, time
import unittest
-from zope.testing.doctest import DocTestSuite
+from doctest import DocTestSuite
def test_suite():
return unittest.TestSuite((
Modified: Zope/trunk/src/ZPublisher/tests/testBeforeTraverse.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/testBeforeTraverse.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/ZPublisher/tests/testBeforeTraverse.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -133,7 +133,8 @@
"""
pass
-from zope.testing import doctest
+import doctest
+
def test_suite():
return doctest.DocTestSuite(optionflags=doctest.ELLIPSIS)
Modified: Zope/trunk/src/ZPublisher/tests/testPublish.py
===================================================================
--- Zope/trunk/src/ZPublisher/tests/testPublish.py 2010-03-27 17:29:42 UTC (rev 110238)
+++ Zope/trunk/src/ZPublisher/tests/testPublish.py 2010-03-27 17:41:31 UTC (rev 110239)
@@ -391,7 +391,7 @@
pass
-from zope.testing import doctest
+import doctest
def test_suite():
return doctest.DocTestSuite()
More information about the Zope-Checkins
mailing list