mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
test: Replace call_autodoc() by do_autodoc()
This commit is contained in:
parent
4c96c6efce
commit
9c4e5b244a
@ -1396,16 +1396,9 @@ def test_mocked_module_imports(app, warning):
|
|||||||
|
|
||||||
@pytest.mark.usefixtures('setup_test')
|
@pytest.mark.usefixtures('setup_test')
|
||||||
def test_partialfunction():
|
def test_partialfunction():
|
||||||
def call_autodoc(objtype, name):
|
options = {"members": None}
|
||||||
inst = app.registry.documenters[objtype](directive, name)
|
actual = do_autodoc(app, 'module', 'target.partialfunction', options)
|
||||||
inst.generate()
|
assert list(actual) == [
|
||||||
result = list(directive.result)
|
|
||||||
del directive.result[:]
|
|
||||||
return result
|
|
||||||
|
|
||||||
options.members = ALL
|
|
||||||
#options.undoc_members = True
|
|
||||||
expected = [
|
|
||||||
'',
|
'',
|
||||||
'.. py:module:: target.partialfunction',
|
'.. py:module:: target.partialfunction',
|
||||||
'',
|
'',
|
||||||
@ -1429,8 +1422,6 @@ def test_partialfunction():
|
|||||||
' '
|
' '
|
||||||
]
|
]
|
||||||
|
|
||||||
assert call_autodoc('module', 'target.partialfunction') == expected
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures('setup_test')
|
@pytest.mark.usefixtures('setup_test')
|
||||||
def test_coroutine():
|
def test_coroutine():
|
||||||
|
Loading…
Reference in New Issue
Block a user