summaryrefslogtreecommitdiffstats
path: root/tests/test_config/test_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_config/test_config.py')
-rw-r--r--tests/test_config/test_config.py18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/test_config/test_config.py b/tests/test_config/test_config.py
index e1cb1b0..e58044e 100644
--- a/tests/test_config/test_config.py
+++ b/tests/test_config/test_config.py
@@ -403,7 +403,7 @@ def test_errors_if_setup_is_not_callable(tmp_path, make_app):
assert 'callable' in str(excinfo.value)
-@pytest.fixture()
+@pytest.fixture
def make_app_with_empty_project(make_app, tmp_path):
(tmp_path / 'conf.py').write_text('', encoding='utf8')
@@ -803,3 +803,19 @@ def test_gettext_compact_command_line_str():
# regression test for #8549 (-D gettext_compact=spam)
assert config.gettext_compact == 'spam'
+
+
+def test_root_doc_and_master_doc_are_synchronized():
+ c = Config()
+ assert c.master_doc == 'index'
+ assert c.root_doc == c.master_doc
+
+ c = Config()
+ c.master_doc = '1234'
+ assert c.master_doc == '1234'
+ assert c.root_doc == c.master_doc
+
+ c = Config()
+ c.root_doc = '1234'
+ assert c.master_doc == '1234'
+ assert c.root_doc == c.master_doc