summaryrefslogtreecommitdiff
path: root/tests/test_util_logging.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2017-10-05 00:00:48 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2017-10-05 00:00:48 +0900
commit50640b700b4cbc9b141a72765378d9a1e416bd22 (patch)
tree3b1d43c319449642252b7f32c2f3c943f4ccb74a /tests/test_util_logging.py
parent4dc46350a70605684d25e9b97465d3357ae5d241 (diff)
downloadsphinx-git-50640b700b4cbc9b141a72765378d9a1e416bd22.tar.gz
Fix #4070, #4111: crashes when the warning message contains format strings (again)
Diffstat (limited to 'tests/test_util_logging.py')
-rw-r--r--tests/test_util_logging.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_util_logging.py b/tests/test_util_logging.py
index 717aa6cd4..7ae086872 100644
--- a/tests/test_util_logging.py
+++ b/tests/test_util_logging.py
@@ -165,7 +165,11 @@ def test_warningiserror(app, status, warning):
# if True, warning raises SphinxWarning exception
app.warningiserror = True
with pytest.raises(SphinxWarning):
- logger.warning('message')
+ logger.warning('message: %s', 'arg')
+
+ # message contains format string (refs: #4070)
+ with pytest.raises(SphinxWarning):
+ logger.warning('%s')
def test_warning_location(app, status, warning):