diff options
| author | Daniel Fremont <dfremont@ucsc.edu> | 2020-05-17 09:07:11 -0700 |
|---|---|---|
| committer | Daniel Fremont <dfremont@ucsc.edu> | 2020-05-17 09:07:11 -0700 |
| commit | de4aca857c28f007a9a633a04a2e2e516c3af19a (patch) | |
| tree | 2249b94666cde0fadf1d59ff58231a74d66c74b6 /tests/test_ext_autosummary.py | |
| parent | f9e9bdc4a0050d4f15c5014be3778f0ad98ef921 (diff) | |
| download | sphinx-git-de4aca857c28f007a9a633a04a2e2e516c3af19a.tar.gz | |
revisions per comments from tk0miya
Diffstat (limited to 'tests/test_ext_autosummary.py')
| -rw-r--r-- | tests/test_ext_autosummary.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_ext_autosummary.py b/tests/test_ext_autosummary.py index aa075a9e6..166029ccb 100644 --- a/tests/test_ext_autosummary.py +++ b/tests/test_ext_autosummary.py @@ -205,14 +205,16 @@ def test_autosummary_generate(app, status, warning): [nodes.tbody, (nodes.row, nodes.row, nodes.row, + nodes.row, nodes.row)])]) assert_node(doctree[4][0], addnodes.toctree, caption="An autosummary") - assert len(doctree[3][0][0][2]) == 4 + assert len(doctree[3][0][0][2]) == 5 assert doctree[3][0][0][2][0].astext() == 'autosummary_dummy_module\n\n' assert doctree[3][0][0][2][1].astext() == 'autosummary_dummy_module.Foo()\n\n' assert doctree[3][0][0][2][2].astext() == 'autosummary_dummy_module.Foo.Bar\n\n' assert doctree[3][0][0][2][3].astext() == 'autosummary_dummy_module.bar(x[, y])\n\n' + assert doctree[3][0][0][2][4].astext() == 'autosummary_dummy_module.qux\n\na module-level attribute' module = (app.srcdir / 'generated' / 'autosummary_dummy_module.rst').read_text() assert (' .. autosummary::\n' @@ -237,6 +239,11 @@ def test_autosummary_generate(app, status, warning): '\n' '.. autoclass:: Foo.Bar\n' in FooBar) + qux = (app.srcdir / 'generated' / 'autosummary_dummy_module.qux.rst').read_text() + assert ('.. currentmodule:: autosummary_dummy_module\n' + '\n' + '.. autodata:: qux' in qux) + @pytest.mark.sphinx('dummy', testroot='ext-autosummary', confoverrides={'autosummary_generate_overwrite': False}) |
