Mercurial > cpython-lru_cache-weakref
view Lib/test/test_difflib.py @ 32527:0da660e05e69 legacy-trunk
"#if WITH_THREAD" is incorrect; must be #ifdef instead; WITH_THREAD
isn't always set to an integer value when it's defined.
| author | Tim Peters <tim.peters@gmail.com> |
|---|---|
| date | Wed, 07 Jul 2004 20:42:07 +0000 |
| parents | aca1ce1b4b61 |
| children | 5546c7ae24f7 |
line wrap: on
line source
import difflib from test import test_support import unittest import doctest class TestSFbugs(unittest.TestCase): def test_ratio_for_null_seqn(self): # Check clearing of SF bug 763023 s = difflib.SequenceMatcher(None, [], []) self.assertEqual(s.ratio(), 1) self.assertEqual(s.quick_ratio(), 1) self.assertEqual(s.real_quick_ratio(), 1) Doctests = doctest.DocTestSuite(difflib) test_support.run_unittest(TestSFbugs, Doctests)
