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

Method test_one_delete

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

Source from the content-addressed store, hash-verified

22 self.assertEqual(sm.bpopular, set())
23
24 def test_one_delete(self):
25 sm = difflib.SequenceMatcher(None, 'a' * 40 + 'c' + 'b' * 40, 'a' * 40 + 'b' * 40)
26 self.assertAlmostEqual(sm.ratio(), 0.994, places=3)
27 self.assertEqual(list(sm.get_opcodes()),
28 [ ('equal', 0, 40, 0, 40),
29 ('delete', 40, 41, 40, 40),
30 ('equal', 41, 81, 40, 80)])
31
32 def test_opcode_caching(self):
33 sm = difflib.SequenceMatcher(None, 'b' * 100, 'a' + 'b' * 100)

Callers

nothing calls this directly

Calls 5

ratioMethod · 0.95
get_opcodesMethod · 0.95
listClass · 0.85
assertAlmostEqualMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected