diff options
author | Raymond Hettinger <python@rcn.com> | 2003-07-16 04:34:56 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2003-07-16 04:34:56 (GMT) |
commit | 43d790c087be582fc9ae61e382aee9eaafd79738 (patch) | |
tree | a979d99d90a548b401a15b3bf47750aeddf74750 /Lib/test/test_difflib.py | |
parent | 83325e9087e1072cd51fed09896dc92a524db781 (diff) | |
download | cpython-43d790c087be582fc9ae61e382aee9eaafd79738.zip cpython-43d790c087be582fc9ae61e382aee9eaafd79738.tar.gz cpython-43d790c087be582fc9ae61e382aee9eaafd79738.tar.bz2 |
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.
Diffstat (limited to 'Lib/test/test_difflib.py')
-rw-r--r-- | Lib/test/test_difflib.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_difflib.py b/Lib/test/test_difflib.py index e33539a..3879967 100644 --- a/Lib/test/test_difflib.py +++ b/Lib/test/test_difflib.py @@ -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) + |