MCPcopy Index your code
hub / github.com/python/mypy / test_simple_sorting

Method test_simple_sorting

mypy/test/testfinegrained.py:379–385  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

377
378class TestMessageSorting(unittest.TestCase):
379 def test_simple_sorting(self) -> None:
380 msgs = ['x.py:1: error: "int" not callable', 'foo/y.py:123: note: "X" not defined']
381 old_msgs = ['foo/y.py:12: note: "Y" not defined', 'x.py:8: error: "str" not callable']
382 assert sort_messages_preserving_file_order(msgs, old_msgs) == list(reversed(msgs))
383 assert sort_messages_preserving_file_order(list(reversed(msgs)), old_msgs) == list(
384 reversed(msgs)
385 )
386
387 def test_long_form_sorting(self) -> None:
388 # Multi-line errors should be sorted together and not split.

Callers

nothing calls this directly

Calls 3

listClass · 0.85
reversedFunction · 0.85

Tested by

no test coverage detected