summaryrefslogtreecommitdiff
path: root/tests/test_util_logging.py
diff options
context:
space:
mode:
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):