summaryrefslogtreecommitdiff
path: root/tests/test_util_logging.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-09 00:17:35 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-09 00:17:37 +0900
commit1ca220762b7d13697d9c8354db80493322f724d8 (patch)
tree66c6212e5e54feb2c3e19a6d4b25aab6e93deb11 /tests/test_util_logging.py
parent2def1fc70410bafa1120e69c6cbf9c4ebe819515 (diff)
downloadsphinx-git-1ca220762b7d13697d9c8354db80493322f724d8.tar.gz
Fix #7423: crashed when giving a non-string object to logger
Diffstat (limited to 'tests/test_util_logging.py')
-rw-r--r--tests/test_util_logging.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_util_logging.py b/tests/test_util_logging.py
index 337782d87..36034cd92 100644
--- a/tests/test_util_logging.py
+++ b/tests/test_util_logging.py
@@ -48,6 +48,14 @@ def test_info_and_warning(app, status, warning):
assert 'message5' in warning.getvalue()
+def test_Exception(app, status, warning):
+ logging.setup(app, status, warning)
+ logger = logging.getLogger(__name__)
+
+ logger.info(Exception)
+ assert "<class 'Exception'>" in status.getvalue()
+
+
def test_verbosity_filter(app, status, warning):
# verbosity = 0: INFO
app.verbosity = 0