(self)
| 385 | ) |
| 386 | |
| 387 | def test_long_form_sorting(self) -> None: |
| 388 | # Multi-line errors should be sorted together and not split. |
| 389 | msg1 = [ |
| 390 | 'x.py:1: error: "int" not callable', |
| 391 | "and message continues (x: y)", |
| 392 | " 1()", |
| 393 | " ^~~", |
| 394 | ] |
| 395 | msg2 = [ |
| 396 | 'foo/y.py: In function "f":', |
| 397 | 'foo/y.py:123: note: "X" not defined', |
| 398 | "and again message continues", |
| 399 | ] |
| 400 | old_msgs = ['foo/y.py:12: note: "Y" not defined', 'x.py:8: error: "str" not callable'] |
| 401 | assert sort_messages_preserving_file_order(msg1 + msg2, old_msgs) == msg2 + msg1 |
| 402 | assert sort_messages_preserving_file_order(msg2 + msg1, old_msgs) == msg2 + msg1 |
| 403 | |
| 404 | def test_mypy_error_prefix(self) -> None: |
| 405 | # Some errors don't have a file and start with "mypy: ". These |
nothing calls this directly
no test coverage detected