Commit 43d790c0 authored by Raymond Hettinger's avatar Raymond Hettinger

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.
parent 83325e90
import difflib import difflib
from test import test_support from test import test_support
import unittest import unittest
import doctest
class TestSFbugs(unittest.TestCase): class TestSFbugs(unittest.TestCase):
...@@ -11,5 +12,7 @@ class TestSFbugs(unittest.TestCase): ...@@ -11,5 +12,7 @@ class TestSFbugs(unittest.TestCase):
self.assertEqual(s.quick_ratio(), 1) self.assertEqual(s.quick_ratio(), 1)
self.assertEqual(s.real_quick_ratio(), 1) self.assertEqual(s.real_quick_ratio(), 1)
test_support.run_unittest(TestSFbugs) Doctests = doctest.DocTestSuite(difflib)
test_support.run_doctest(difflib)
test_support.run_unittest(TestSFbugs, Doctests)
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