[Checkins] SVN: zc.objectlog/trunk/ Using Python's ``doctest`` module instead of deprecated ``zope.testing.doctest``.
Michael Howitz
mh at gocept.com
Fri Apr 1 02:57:45 EDT 2011
Log message for revision 121184:
Using Python's ``doctest`` module instead of deprecated ``zope.testing.doctest``.
Changed:
U zc.objectlog/trunk/CHANGES.txt
U zc.objectlog/trunk/src/zc/objectlog/tests.py
-=-
Modified: zc.objectlog/trunk/CHANGES.txt
===================================================================
--- zc.objectlog/trunk/CHANGES.txt 2011-04-01 06:56:09 UTC (rev 121183)
+++ zc.objectlog/trunk/CHANGES.txt 2011-04-01 06:57:45 UTC (rev 121184)
@@ -6,6 +6,8 @@
* Updated tests to run with `zope.schema` >= 3.6 thus requiring at least
this version.
+* Using Python's ``doctest`` module instead of deprecated
+ ``zope.testing.doctest``.
0.2.1 (2008-05-16)
----------------
Modified: zc.objectlog/trunk/src/zc/objectlog/tests.py
===================================================================
--- zc.objectlog/trunk/src/zc/objectlog/tests.py 2011-04-01 06:56:09 UTC (rev 121183)
+++ zc.objectlog/trunk/src/zc/objectlog/tests.py 2011-04-01 06:57:45 UTC (rev 121184)
@@ -12,14 +12,10 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
-"""objectlog module test runner
+"""objectlog module test runner"""
-$Id: tests.py 12198 2006-06-14 20:56:25Z gary $
-"""
-
-import unittest, transaction
-from zope.testing import doctest, module
-from zope.testing.doctestunit import DocTestSuite
+import unittest, transaction, doctest
+from zope.testing import module
from zope.component import testing
def setUp(test):
@@ -48,7 +44,7 @@
self.id = unicode(id)
self.title = title
self.description = description
-
+
alice = DummyPrincipal('alice', 'Alice Aal', 'a principled principal')
class DummyParticipation(object):
interface.implements(zope.publisher.interfaces.IRequest)
@@ -64,14 +60,12 @@
module.tearDown(test)
testing.tearDown(test)
+
def test_suite():
return unittest.TestSuite((
doctest.DocFileSuite('log.txt',
setUp=setUp, tearDown=tearDown,),
doctest.DocFileSuite('copier.txt',
setUp=copierSetUp, tearDown=copierTearDown,),
- DocTestSuite('zc.objectlog.utils'),
+ doctest.DocTestSuite('zc.objectlog.utils'),
))
-
-if __name__ == '__main__':
- unittest.main(defaultTest='test_suite')
More information about the checkins
mailing list