(self)
| 377 | |
| 378 | class 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. |
nothing calls this directly
no test coverage detected