diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2009-11-23 19:06:11 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2009-11-23 19:06:11 (GMT) |
commit | d884f8a9c4f62991b7f2b329bc3074aa3f93df4c (patch) | |
tree | 89894b850e69ee6424fddd3955292a8b7792a0eb /Lib/test | |
parent | eb0146858b9778a7d75276a77c77d5efc9a88a4e (diff) | |
download | cpython-d884f8a9c4f62991b7f2b329bc3074aa3f93df4c.zip cpython-d884f8a9c4f62991b7f2b329bc3074aa3f93df4c.tar.gz cpython-d884f8a9c4f62991b7f2b329bc3074aa3f93df4c.tar.bz2 |
Merged revisions 76469 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r76469 | senthil.kumaran | 2009-11-24 00:32:52 +0530 (Tue, 24 Nov 2009) | 10 lines
Merged revisions 76464 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76464 | senthil.kumaran | 2009-11-24 00:11:31 +0530 (Tue, 24 Nov 2009) | 4 lines
Fix for issue1488943 - difflib.Differ() doesn't always add hints for tab
characters.
........
................
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_difflib.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_difflib.py b/Lib/test/test_difflib.py index c314b53..852aae9 100644 --- a/Lib/test/test_difflib.py +++ b/Lib/test/test_difflib.py @@ -20,6 +20,14 @@ class TestSFbugs(unittest.TestCase): diff_gen = difflib.unified_diff([], []) self.assertRaises(StopIteration, next, diff_gen) + def test_added_tab_hint(self): + # Check fix for bug #1488943 + diff = list(difflib.Differ().compare(["\tI am a buggy"],["\t\tI am a bug"])) + self.assertEqual("- \tI am a buggy", diff[0]) + self.assertEqual("? --\n", diff[1]) + self.assertEqual("+ \t\tI am a bug", diff[2]) + self.assertEqual("? +\n", diff[3]) + patch914575_from1 = """ 1. Beautiful is beTTer than ugly. 2. Explicit is better than implicit. |