[Zodb-checkins] SVN: ZODB/trunk/src/persistent/tests/test_ The stdlib doctest.DocTestSuite is broken in such a way that you can't
Jim Fulton
jim at zope.com
Thu Sep 2 09:55:37 EDT 2010
Log message for revision 116137:
The stdlib doctest.DocTestSuite is broken in such a way that you can't
repeat tests. Provide an environment variable to use the doctest from
zope.testing.
Changed:
U ZODB/trunk/src/persistent/tests/test_overriding_attrs.py
U ZODB/trunk/src/persistent/tests/test_persistent.py
U ZODB/trunk/src/persistent/tests/test_pickle.py
U ZODB/trunk/src/persistent/tests/test_wref.py
-=-
Modified: ZODB/trunk/src/persistent/tests/test_overriding_attrs.py
===================================================================
--- ZODB/trunk/src/persistent/tests/test_overriding_attrs.py 2010-09-02 13:55:34 UTC (rev 116136)
+++ ZODB/trunk/src/persistent/tests/test_overriding_attrs.py 2010-09-02 13:55:36 UTC (rev 116137)
@@ -377,5 +377,9 @@
def test_suite():
- from doctest import DocTestSuite
+ import os
+ if os.environ.get('USE_ZOPE_TESTING_DOCTEST'):
+ from zope.testing.doctest import DocTestSuite
+ else:
+ from doctest import DocTestSuite
return DocTestSuite()
Modified: ZODB/trunk/src/persistent/tests/test_persistent.py
===================================================================
--- ZODB/trunk/src/persistent/tests/test_persistent.py 2010-09-02 13:55:34 UTC (rev 116136)
+++ ZODB/trunk/src/persistent/tests/test_persistent.py 2010-09-02 13:55:36 UTC (rev 116137)
@@ -12,7 +12,12 @@
#
##############################################################################
from persistent import Persistent, simple_new
-import doctest
+import os
+if os.environ.get('USE_ZOPE_TESTING_DOCTEST'):
+ from zope.testing import doctest
+else:
+ import doctest
+
import unittest
class P(Persistent):
Modified: ZODB/trunk/src/persistent/tests/test_pickle.py
===================================================================
--- ZODB/trunk/src/persistent/tests/test_pickle.py 2010-09-02 13:55:34 UTC (rev 116136)
+++ ZODB/trunk/src/persistent/tests/test_pickle.py 2010-09-02 13:55:36 UTC (rev 116137)
@@ -264,7 +264,12 @@
"""
-from doctest import DocTestSuite
+import os
+if os.environ.get('USE_ZOPE_TESTING_DOCTEST'):
+ from zope.testing.doctest import DocTestSuite
+else:
+ from doctest import DocTestSuite
+
import unittest
def test_suite():
Modified: ZODB/trunk/src/persistent/tests/test_wref.py
===================================================================
--- ZODB/trunk/src/persistent/tests/test_wref.py 2010-09-02 13:55:34 UTC (rev 116136)
+++ ZODB/trunk/src/persistent/tests/test_wref.py 2010-09-02 13:55:36 UTC (rev 116137)
@@ -12,7 +12,11 @@
#
##############################################################################
import unittest
-from doctest import DocTestSuite
+import os
+if os.environ.get('USE_ZOPE_TESTING_DOCTEST'):
+ from zope.testing.doctest import DocTestSuite
+else:
+ from doctest import DocTestSuite
def test_suite():
return DocTestSuite('persistent.wref')
More information about the Zodb-checkins
mailing list