Skip to content

Commit

Permalink
try setting log level
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed May 28, 2022
1 parent 5d923ae commit c7cbe81
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Test the sphinx.config.Config class."""
import logging

from sphinx.config import ENUM, Config, check_confval_types

Expand All @@ -24,7 +25,8 @@ def test_conf_py_language_none_warning(tempdir, caplog):
(tempdir / 'conf.py').write_text("language = None", encoding='utf-8')

# When we load conf.py into a Config object
Config.read(tempdir, {}, None)
with caplog.at_level(logging.DEBUG):
Config.read(tempdir, {}, None)

# Then a warning is raised
assert len(caplog.records) == 1
Expand Down

0 comments on commit c7cbe81

Please sign in to comment.