diff options
| author | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-10-05 00:00:48 +0900 |
|---|---|---|
| committer | Takeshi KOMIYA <i.tkomiya@gmail.com> | 2017-10-05 00:00:48 +0900 |
| commit | 50640b700b4cbc9b141a72765378d9a1e416bd22 (patch) | |
| tree | 3b1d43c319449642252b7f32c2f3c943f4ccb74a /tests/test_util_logging.py | |
| parent | 4dc46350a70605684d25e9b97465d3357ae5d241 (diff) | |
| download | sphinx-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.py | 6 |
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): |
