summaryrefslogtreecommitdiff
path: root/tests/test_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_config.py')
-rw-r--r--tests/test_config.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_config.py b/tests/test_config.py
index a5da0d6ec..1d3a49e95 100644
--- a/tests/test_config.py
+++ b/tests/test_config.py
@@ -119,6 +119,20 @@ def test_overrides():
assert config.value8 == ['abc', 'def', 'ghi']
+def test_overrides_boolean():
+ config = Config({}, {'value1': '1',
+ 'value2': '0',
+ 'value3': '0'})
+ config.add('value1', None, 'env', [bool])
+ config.add('value2', None, 'env', [bool])
+ config.add('value3', True, 'env', ())
+ config.init_values()
+
+ assert config.value1 is True
+ assert config.value2 is False
+ assert config.value3 is False
+
+
@mock.patch("sphinx.config.logger")
def test_errors_warnings(logger, tempdir):
# test the error for syntax errors in the config file