Commit b66cbcc0 authored by Jim Fulton's avatar Jim Fulton

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.
parent 7810de8d
......@@ -377,5 +377,9 @@ class SampleOverridingGetattributeSetattrAndDelattr(Persistent):
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()
......@@ -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):
......
......@@ -264,7 +264,12 @@ def test_pickling_w_slots_w_empty_dict():
"""
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():
......
......@@ -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')
......
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