Staging
v0.5.1
https://github.com/python/cpython
Raw File
Tip revision: b4c8cba4b4405f5abf394ffc8286a1dd13732a8f authored by Anthony Baxter on 23 October 2006, 15:38:59 UTC
set svn:ignore. anal retentiveness, makes it easier to spot actual problems
Tip revision: b4c8cba
test_difflib.py
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)

back to top