home *** CD-ROM | disk | FTP | other *** search
/ H4CK3R 14 / hacker14.iso / programacao / pythonwin / python.exe / TEST_DIFFLIB.PY < prev    next >
Encoding:
Python Source  |  2003-07-16  |  491 b   |  19 lines

  1. import difflib
  2. from test import test_support
  3. import unittest
  4. import doctest
  5.  
  6. class TestSFbugs(unittest.TestCase):
  7.  
  8.     def test_ratio_for_null_seqn(self):
  9.         # Check clearing of SF bug 763023
  10.         s = difflib.SequenceMatcher(None, [], [])
  11.         self.assertEqual(s.ratio(), 1)
  12.         self.assertEqual(s.quick_ratio(), 1)
  13.         self.assertEqual(s.real_quick_ratio(), 1)
  14.  
  15. Doctests = doctest.DocTestSuite(difflib)
  16.  
  17. test_support.run_unittest(TestSFbugs, Doctests)
  18.  
  19.