MCPcopy Create free account
hub / github.com/python/mypy / test_diff_ranges

Method test_diff_ranges

mypy/test/meta/test_diff_helper.py:32–47  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

30 assert output.getvalue() == "a\nb\nc\n...\nf\ng\nh\nsquare (diff)\ni\nj\n"
31
32 def test_diff_ranges(self) -> None:
33 a = ["hello", "world"]
34 b = ["hello", "world"]
35
36 assert diff_ranges(a, b) == (
37 [(0, 0), (0, 2), (2, 2), (2, 2)],
38 [(0, 0), (0, 2), (2, 2), (2, 2)],
39 )
40
41 a = ["hello", "world"]
42 b = ["goodbye", "world"]
43
44 assert diff_ranges(a, b) == (
45 [(0, 1), (1, 2), (2, 2), (2, 2)],
46 [(0, 1), (1, 2), (2, 2), (2, 2)],
47 )

Callers

nothing calls this directly

Calls 1

diff_rangesFunction · 0.90

Tested by

no test coverage detected