Responding to comments

This commit is contained in:
Joel Nothman 2020-07-10 11:30:06 +10:00
parent 4e0ff5cac2
commit 52c173bdb9
5 changed files with 32 additions and 24 deletions

View File

@ -1,16 +1,31 @@
sphinx
======
Autosummary test
================
.. automodule:: sphinx
.. autosummary::
:toctree: generated
sphinx.application.Sphinx
.. currentmodule:: sphinx.application
.. autoclass:: TemplateBridge
Basic test
.. autosummary::
render -- some ignored stuff goes here
render_string More ignored stuff
Test with tildes
.. autosummary::
~TemplateBridge.render
~TemplateBridge.render_string
Methods:
.. automethod:: render
.. automethod:: render_string

View File

@ -1,4 +0,0 @@
import sys
# Fail module import in a catastrophic way
sys.exit(1)

View File

@ -5,6 +5,7 @@ sys.path.insert(0, os.path.abspath('.'))
extensions = ['sphinx.ext.autosummary']
autosummary_generate = True
# The suffix of source filenames.
source_suffix = '.rst'
autosummary_filename_map = {
"autosummary_dummy_module": "module_mangled",
"autosummary_dummy_module.bar": "bar"
}

View File

@ -12,4 +12,3 @@
autosummary_dummy_module.Foo.Bar
autosummary_dummy_module.bar
autosummary_dummy_module.qux
autosummary_importfail

View File

@ -386,10 +386,7 @@ def test_autosummary_recursive(app, status, warning):
assert 'package.package.module' in content
@pytest.mark.sphinx('dummy', testroot='ext-autosummary-filename-map',
confoverrides={'autosummary_filename_map':
{"autosummary_dummy_module": "module_mangled",
"autosummary_dummy_module.bar": "bar"}})
@pytest.mark.sphinx('dummy', testroot='ext-autosummary-filename-map')
def test_autosummary_filename_map(app, status, warning):
app.build()