From 9c4e5b244a0f7e24e073bada655ab7e29a8fe506 Mon Sep 17 00:00:00 2001 From: Takeshi KOMIYA Date: Sun, 11 Nov 2018 21:22:11 +0900 Subject: [PATCH] test: Replace call_autodoc() by do_autodoc() --- tests/test_autodoc.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py index 6e1b988b4..7277726cf 100644 --- a/tests/test_autodoc.py +++ b/tests/test_autodoc.py @@ -1396,16 +1396,9 @@ def test_mocked_module_imports(app, warning): @pytest.mark.usefixtures('setup_test') def test_partialfunction(): - def call_autodoc(objtype, name): - inst = app.registry.documenters[objtype](directive, name) - inst.generate() - result = list(directive.result) - del directive.result[:] - return result - - options.members = ALL - #options.undoc_members = True - expected = [ + options = {"members": None} + actual = do_autodoc(app, 'module', 'target.partialfunction', options) + assert list(actual) == [ '', '.. py:module:: target.partialfunction', '', @@ -1429,8 +1422,6 @@ def test_partialfunction(): ' ' ] - assert call_autodoc('module', 'target.partialfunction') == expected - @pytest.mark.usefixtures('setup_test') def test_coroutine():