From 43d790c087be582fc9ae61e382aee9eaafd79738 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Wed, 16 Jul 2003 04:34:56 +0000 Subject: [PATCH] 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. --- Lib/test/test_difflib.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_difflib.py b/Lib/test/test_difflib.py index e33539a4605..3879967ddb8 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 @@ def test_ratio_for_null_seqn(self): 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) +