Test error message settings with both options of `show_full_message`.
(*, show_full_message: bool, expected_message: str)
| 88 | ], |
| 89 | ) |
| 90 | async def test_show_full_message(*, show_full_message: bool, expected_message: str) -> None: |
| 91 | """Test error message settings with both options of `show_full_message`.""" |
| 92 | error_tracker = ErrorTracker( |
| 93 | show_error_name=False, show_file_and_line_number=False, show_full_message=show_full_message |
| 94 | ) |
| 95 | |
| 96 | try: |
| 97 | raise RuntimeError('Error line 1\n Error line 2') # Errors raised on the same line |
| 98 | except Exception as e: |
| 99 | await error_tracker.add(e) |
| 100 | |
| 101 | assert error_tracker.get_most_common_errors()[0][0] == expected_message |
| 102 | |
| 103 | |
| 104 | async def test_error_tracker_with_errors_chain() -> None: |
nothing calls this directly
no test coverage detected