[PATCH] zope.app.testing: Use doctest instead of deprecated zope.testing.doctest
Jonathan Lange <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello, Recent versions of zope.testing deprecate the zope.testing.doctest module in favour of the standard library's doctest module. zope.app.testing currently uses zope.testing.doctest for its tests and to provide its functional testing features. This patch changes it to use standard library doctest. The patch also deletes a repeated import line from zope.app.testing.functional, caught thanks to pyflakes. jml _______________________________________________ Zope-Dev maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
zat-doctest.diff
(text/x-patch, 1.5 KB)
=== modified file 'src/zope/app/testing/functional.py' --- src/zope/app/testing/functional.py 2009-11-19 16:31:33 +0000 +++ src/zope/app/testing/functional.py 2010-04-10 17:38:33 +0000 @@ -18,6 +18,7 @@ $Id: functional.py 105881 2009-11-19 16:31:33Z tlotze $ """ import copy +import doctest import logging import os.path import re @@ -39,7 +40,6 @@ from zope.publisher.publish import publish from zope.publisher.skinnable import setDefaultSkin from zope.security.interfaces import Forbidden, Unauthorized -from zope.testing import doctest import zope.app.appsetup.product import zope.app.testing.setup @@ -47,7 +47,6 @@ from zope.app.debug import Debugger from zope.app.publication.http import HTTPPublication from zope.app.publication.zopepublication import ZopePublication -from zope.app.publication.http import HTTPPublication from zope.app.publication.httpfactory import chooseClasses from zope.component.hooks import setSite, getSite === modified file 'src/zope/app/testing/tests.py' --- src/zope/app/testing/tests.py 2009-07-24 14:04:31 +0000 +++ src/zope/app/testing/tests.py 2010-04-10 17:39:57 +0000 @@ -15,12 +15,12 @@ $Id: tests.py 102244 2009-07-24 14:04:31Z srichter $ """ +from doctest import DocTestSuite import os import re import unittest import StringIO -from zope.testing.doctestunit import DocTestSuite from zope.testing.renormalizing import RENormalizing from zope.component import getAllUtilitiesRegisteredFor from ZODB.interfaces import IDatabase