summaryrefslogtreecommitdiff
path: root/tests/test_ext_autosummary.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-02-23 01:51:43 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-21 22:47:00 +0900
commit476b73b6ca6dd3e64a557495e3f8137e702f77dd (patch)
tree0ee0f600e3343e1e012f4ccf1d744c4c622cd09b /tests/test_ext_autosummary.py
parent665458561fb28c882f8e66c569e6586ada8a5f8b (diff)
downloadsphinx-git-476b73b6ca6dd3e64a557495e3f8137e702f77dd.tar.gz
autosummary: Add :recursive: option to autosummary directive
Diffstat (limited to 'tests/test_ext_autosummary.py')
-rw-r--r--tests/test_ext_autosummary.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_ext_autosummary.py b/tests/test_ext_autosummary.py
index 7b59c8dd5..de439248e 100644
--- a/tests/test_ext_autosummary.py
+++ b/tests/test_ext_autosummary.py
@@ -292,6 +292,11 @@ def test_autosummary_recursive_enabled(app, status, warning):
if toctree:
assert not (generated / toctree).exists()
+ # autosummary without :recursive: option
+ generated = app.srcdir / 'generated'
+ assert (generated / 'package2.rst').exists()
+ assert not (generated / 'package2.module.rst').exists()
+
@pytest.mark.sphinx('dummy', testroot='ext-autosummary-recursive',
srcdir='ext-autosummary-recursive-disabled',
@@ -382,7 +387,7 @@ def test_autosummary_imported_members(app, status, warning):
@pytest.mark.sphinx(testroot='ext-autodoc')
def test_generate_autosummary_docs_property(app):
with patch('sphinx.ext.autosummary.generate.find_autosummary_in_files') as mock:
- mock.return_value = [AutosummaryEntry('target.methods.Base.prop', 'prop', None)]
+ mock.return_value = [AutosummaryEntry('target.methods.Base.prop', 'prop', None, False)]
generate_autosummary_docs([], output_dir=app.srcdir, builder=app.builder, app=app)
content = (app.srcdir / 'target.methods.Base.prop.rst').text()