(self)
| 30 | ('equal', 41, 81, 40, 80)]) |
| 31 | |
| 32 | def test_opcode_caching(self): |
| 33 | sm = difflib.SequenceMatcher(None, 'b' * 100, 'a' + 'b' * 100) |
| 34 | opcode = sm.get_opcodes() |
| 35 | self.assertEqual(opcode, |
| 36 | [ ('insert', 0, 0, 0, 1), |
| 37 | ('equal', 0, 100, 1, 101)]) |
| 38 | # Implementation detail: opcodes are cached; |
| 39 | # `get_opcodes()` returns the same object |
| 40 | self.assertIs(opcode, sm.get_opcodes()) |
| 41 | |
| 42 | def test_bjunk(self): |
| 43 | sm = difflib.SequenceMatcher(isjunk=lambda x: x == ' ', |
nothing calls this directly
no test coverage detected