diff options
author | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-04-25 11:31:57 +0100 |
---|---|---|
committer | Adam Turner <9087854+aa-turner@users.noreply.github.com> | 2023-04-25 11:31:57 +0100 |
commit | d2aa91f63ce2fa749e4d8835ea7b771ead29e54a (patch) | |
tree | 7d00b8e67b20832b89c32264e9b347150b5f38de /tests | |
parent | 60d8fa10b881308c97012d478fb13770a41b469f (diff) | |
download | sphinx-git-d2aa91f63ce2fa749e4d8835ea7b771ead29e54a.tar.gz |
Revert the default type of ``nitpick_ignore[_regex]`` to ``list``
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_config.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py index cf42e5c27..ec5d0948f 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -427,3 +427,18 @@ def test_conf_py_no_language(tempdir): # Then the language is coerced to English assert cfg.language == "en" + + +def test_conf_py_nitpick_ignore_list(tempdir): + """Regression test for #11355.""" + + # Given a conf.py file with no language attribute + (tempdir / 'conf.py').write_text("", encoding='utf-8') + + # When we load conf.py into a Config object + cfg = Config.read(tempdir, {}, None) + cfg.init_values() + + # Then the default nitpick_ignore[_regex] is an empty list + assert cfg.nitpick_ignore == [] + assert cfg.nitpick_ignore_regex == [] |