~pythoneers/ubuntu/lucid/python2.6/ltsppa

« back to all changes in this revision

Viewing changes to Lib/test/test_difflib.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100311133019-sonignhpjsu6ld0x
Tags: 2.6.5~rc2-0ubuntu1
Python 2.6.5 release candidate 2.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
        diff_gen = difflib.unified_diff([], [])
21
21
        self.assertRaises(StopIteration, diff_gen.next)
22
22
 
 
23
    def test_added_tab_hint(self):
 
24
        # Check fix for bug #1488943
 
25
        diff = list(difflib.Differ().compare(["\tI am a buggy"],["\t\tI am a bug"]))
 
26
        self.assertEqual("- \tI am a buggy", diff[0])
 
27
        self.assertEqual("?            --\n", diff[1])
 
28
        self.assertEqual("+ \t\tI am a bug", diff[2])
 
29
        self.assertEqual("? +\n", diff[3])
 
30
 
23
31
patch914575_from1 = """
24
32
   1. Beautiful is beTTer than ugly.
25
33
   2. Explicit is better than implicit.