2024-11-22 21:54:26 +00:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
2018-09-08 10:20:15 -07:00
|
|
|
from sphinx.errors import ExtensionError
|
|
|
|
|
|
|
|
|
|
|
2025-02-15 23:23:56 +00:00
|
|
|
def test_extension_error_repr() -> None:
|
2024-08-11 14:58:56 +01:00
|
|
|
exc = ExtensionError('foo')
|
2018-09-08 10:20:15 -07:00
|
|
|
assert repr(exc) == "ExtensionError('foo')"
|
|
|
|
|
|
|
|
|
|
|
2025-02-15 23:23:56 +00:00
|
|
|
def test_extension_error_with_orig_exc_repr() -> None:
|
2024-08-11 14:58:56 +01:00
|
|
|
exc = ExtensionError('foo', Exception('bar'))
|
2022-06-17 03:33:55 +09:00
|
|
|
assert repr(exc) == "ExtensionError('foo', Exception('bar'))"
|