Commit 002c497f authored by Hanno Schlichting's avatar Hanno Schlichting

Use the standard libraries doctest module in favor of the deprecated version in zope.testing

parent b505fb29
......@@ -11,6 +11,9 @@ Trunk (unreleased)
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.
......
......@@ -17,13 +17,13 @@ Well, at least begin testing some of the functionality
$Id$
"""
import doctest
import unittest
import os
import operator
import sys
from zope.testing import doctest
import ZODB
......
......@@ -574,7 +574,7 @@ def test_zsp_gets_right_roles_for_methods():
"""
from zope.testing.doctest import DocTestSuite
from doctest import DocTestSuite
def test_suite():
suite = unittest.TestSuite()
......
......@@ -31,7 +31,7 @@ def test_InitializeClass():
>>> InitializeClass(C)
"""
from zope.testing.doctest import DocTestSuite
from doctest import DocTestSuite
import unittest
def test_suite():
......
......@@ -36,7 +36,7 @@
$Id$
"""
import unittest
from zope.testing.doctest import DocTestSuite
from doctest import DocTestSuite
def test_suite():
return unittest.TestSuite((
......
......@@ -50,7 +50,7 @@
$Id$
"""
import unittest
from zope.testing.doctest import DocTestSuite
from doctest import DocTestSuite
def test_suite():
return unittest.TestSuite((
......
......@@ -83,6 +83,6 @@ class MyNewFolder(DontComplain, Folder):
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)
......@@ -49,5 +49,5 @@ def test_processInputs():
"""
def test_suite():
from zope.testing.doctest import DocTestSuite
from doctest import DocTestSuite
return DocTestSuite()
......@@ -86,5 +86,5 @@ def test_zpt_i18n():
def test_suite():
from Testing.ZopeTestCase import FunctionalDocTestSuite
from zope.testing.doctest import ELLIPSIS
from doctest import ELLIPSIS
return FunctionalDocTestSuite(optionflags=ELLIPSIS)
......@@ -129,5 +129,5 @@ def test_allowed_interface():
def test_suite():
from Testing.ZopeTestCase import FunctionalDocTestSuite
from zope.testing.doctest import ELLIPSIS
from doctest import ELLIPSIS
return FunctionalDocTestSuite(optionflags=ELLIPSIS)
......@@ -16,7 +16,7 @@
$Id$
"""
import unittest
from zope.testing.doctestunit import DocFileSuite
from doctest import DocFileSuite
from Testing.ZopeTestCase import FunctionalDocFileSuite
__docformat__ = "reStructuredText"
......
......@@ -55,5 +55,5 @@ def test_directive():
def test_suite():
from zope.testing.doctest import DocTestSuite
from doctest import DocTestSuite
return DocTestSuite(setUp=setUp, tearDown=tearDown)
......@@ -15,7 +15,5 @@
$Id$
"""
from zope.testing.doctest import *
from zope.testing.doctest import _normalize_module
from doctest import *
from functional import *
......@@ -15,11 +15,13 @@
$Id$
"""
import sys, re, base64
import base64
import doctest
import re
import sys
import warnings
import transaction
from zope.testing import doctest
import transaction
from Testing.ZopeTestCase import ZopeTestCase
from Testing.ZopeTestCase import FunctionalTestCase
......@@ -93,7 +95,6 @@ basicre = re.compile('Basic (.+)?:(.+)?$')
def auth_header(header):
match = basicre.match(header)
if match:
import base64
u, p = match.group(1, 2)
if u is None:
u = ''
......
......@@ -57,7 +57,7 @@ $Id: tests.py,v 1.2 2003/11/28 16:46:39 jim Exp $
import ThreadLock, threading, time
import unittest
from zope.testing.doctest import DocTestSuite
from doctest import DocTestSuite
def test_suite():
return unittest.TestSuite((
......
......@@ -133,7 +133,8 @@ def testBeforeTraverse(self):
"""
pass
from zope.testing import doctest
import doctest
def test_suite():
return doctest.DocTestSuite(optionflags=doctest.ELLIPSIS)
......@@ -391,7 +391,7 @@ def testPublishPath():
pass
from zope.testing import doctest
import doctest
def test_suite():
return doctest.DocTestSuite()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment