MCPcopy Index your code
hub / github.com/python/cpython / test_matching_blocks_cache

Method test_matching_blocks_cache

Lib/test/test_difflib.py:89–96  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

87 self.assertRaises(StopIteration, next, diff_gen)
88
89 def test_matching_blocks_cache(self):
90 # Issue #21635
91 s = difflib.SequenceMatcher(None, "abxcd", "abcd")
92 first = s.get_matching_blocks()
93 second = s.get_matching_blocks()
94 self.assertEqual(second[0].size, 2)
95 self.assertEqual(second[1].size, 2)
96 self.assertEqual(second[2].size, 0)
97
98 def test_added_tab_hint(self):
99 # Check fix for bug #1488943

Callers

nothing calls this directly

Calls 2

get_matching_blocksMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected