summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_difflib.py
blob: e33539a460524184e96f7122edf37cf3596f2387 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import difflib
from test import test_support
import unittest

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)

test_support.run_unittest(TestSFbugs)
test_support.run_doctest(difflib)