home *** CD-ROM | disk | FTP | other *** search
/ PC World 2005 June / PCWorld_2005-06_cd.bin / software / vyzkuste / firewally / firewally.exe / framework-2.3.exe / test_difflib.py < prev    next >
Text File  |  2003-12-30  |  473b  |  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.