tests/test_errors.py
raw| 1 | from __future__ import annotations |
| 2 | |
| 3 | from sphinx.errors import ExtensionError |
| 4 | |
| 5 | |
| 6 | def test_extension_error_repr() -> None: |
| 7 | exc = ExtensionError('foo') |
| 8 | assert repr(exc) == "ExtensionError('foo')" |
| 9 | |
| 10 | |
| 11 | def test_extension_error_with_orig_exc_repr() -> None: |
| 12 | exc = ExtensionError('foo', Exception('bar')) |
| 13 | assert repr(exc) == "ExtensionError('foo', Exception('bar'))" |