Back to index

python3.2  3.2.2
Public Member Functions
test.test_difflib.TestSFbugs Class Reference

List of all members.

Public Member Functions

def test_ratio_for_null_seqn
def test_comparing_empty_lists
def test_added_tab_hint

Detailed Description

Definition at line 64 of file test_difflib.py.


Member Function Documentation

Definition at line 79 of file test_difflib.py.

00079 
00080     def test_added_tab_hint(self):
00081         # Check fix for bug #1488943
00082         diff = list(difflib.Differ().compare(["\tI am a buggy"],["\t\tI am a bug"]))
00083         self.assertEqual("- \tI am a buggy", diff[0])
00084         self.assertEqual("?            --\n", diff[1])
00085         self.assertEqual("+ \t\tI am a bug", diff[2])
00086         self.assertEqual("? +\n", diff[3])

Here is the call graph for this function:

Definition at line 72 of file test_difflib.py.

00072 
00073     def test_comparing_empty_lists(self):
00074         # Check fix for bug #979794
00075         group_gen = difflib.SequenceMatcher(None, [], []).get_grouped_opcodes()
00076         self.assertRaises(StopIteration, next, group_gen)
00077         diff_gen = difflib.unified_diff([], [])
00078         self.assertRaises(StopIteration, next, diff_gen)

Here is the call graph for this function:

Definition at line 65 of file test_difflib.py.

00065 
00066     def test_ratio_for_null_seqn(self):
00067         # Check clearing of SF bug 763023
00068         s = difflib.SequenceMatcher(None, [], [])
00069         self.assertEqual(s.ratio(), 1)
00070         self.assertEqual(s.quick_ratio(), 1)
00071         self.assertEqual(s.real_quick_ratio(), 1)

Here is the call graph for this function:


The documentation for this class was generated from the following file: