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():