mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Add test
This commit is contained in:
parent
39916e6ed3
commit
20a1775c83
@ -381,3 +381,17 @@ def test_nitpick_ignore_regex_fullmatch(app, status, warning):
|
||||
assert len(warning) == len(nitpick_warnings)
|
||||
for actual, expected in zip(warning, nitpick_warnings):
|
||||
assert expected in actual
|
||||
|
||||
|
||||
def test_conf_py_language_none(tempdir):
|
||||
"""Regression test for #10474."""
|
||||
|
||||
# Given a conf.py file with language = None
|
||||
(tempdir / 'conf.py').write_text("language = None", encoding='utf-8')
|
||||
|
||||
# When we load conf.py into a Config object
|
||||
cfg = Config.read(tempdir, {}, None)
|
||||
cfg.init_values()
|
||||
|
||||
# Then the language is coerced to English
|
||||
assert cfg.language == "en"
|
||||
|
Loading…
Reference in New Issue
Block a user