summaryrefslogtreecommitdiffstats
path: root/tests/test_errors.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_errors.py')
-rw-r--r--tests/test_errors.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_errors.py b/tests/test_errors.py
new file mode 100644
index 0000000..6378760
--- /dev/null
+++ b/tests/test_errors.py
@@ -0,0 +1,11 @@
+from sphinx.errors import ExtensionError
+
+
+def test_extension_error_repr():
+ exc = ExtensionError("foo")
+ assert repr(exc) == "ExtensionError('foo')"
+
+
+def test_extension_error_with_orig_exc_repr():
+ exc = ExtensionError("foo", Exception("bar"))
+ assert repr(exc) == "ExtensionError('foo', Exception('bar'))"