Exercise Jim Fulton's new doctest extension for running doctests in a

unittest environment.  Since his extension finds docstrings in private
functions, it exposed a bug in the difflib doctests.
This commit is contained in:
Raymond Hettinger 2003-07-16 04:34:56 +00:00
parent 83325e9087
commit 43d790c087
1 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
import difflib
from test import test_support
import unittest
import doctest
class TestSFbugs(unittest.TestCase):
@ -11,5 +12,7 @@ class TestSFbugs(unittest.TestCase):
self.assertEqual(s.quick_ratio(), 1)
self.assertEqual(s.real_quick_ratio(), 1)
test_support.run_unittest(TestSFbugs)
test_support.run_doctest(difflib)
Doctests = doctest.DocTestSuite(difflib)
test_support.run_unittest(TestSFbugs, Doctests)