test: Fix autosummary testcase

This commit is contained in:
Takeshi KOMIYA 2017-07-02 18:41:03 +09:00
parent b3e0e29f4c
commit dc6a8a5457
3 changed files with 4 additions and 4 deletions

View File

@ -2,5 +2,5 @@
.. autosummary:: .. autosummary::
:toctree: generated :toctree: generated
autodoc_dummy_module autosummary_dummy_module
autodoc_dummy_module.Foo autosummary_dummy_module.Foo

View File

@ -132,13 +132,13 @@ def test_escaping(app, status, warning):
def test_autosummary_generate(app, status, warning): def test_autosummary_generate(app, status, warning):
app.builder.build_all() app.builder.build_all()
module = (app.srcdir / 'generated' / 'autodoc_dummy_module.rst').text() module = (app.srcdir / 'generated' / 'autosummary_dummy_module.rst').text()
assert (' .. autosummary::\n' assert (' .. autosummary::\n'
' \n' ' \n'
' Foo\n' ' Foo\n'
' \n' in module) ' \n' in module)
Foo = (app.srcdir / 'generated' / 'autodoc_dummy_module.Foo.rst').text() Foo = (app.srcdir / 'generated' / 'autosummary_dummy_module.Foo.rst').text()
assert '.. automethod:: __init__' in Foo assert '.. automethod:: __init__' in Foo
assert (' .. autosummary::\n' assert (' .. autosummary::\n'
' \n' ' \n'