summaryrefslogtreecommitdiff
path: root/tests/test_autodoc.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_autodoc.py')
-rw-r--r--tests/test_autodoc.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_autodoc.py b/tests/test_autodoc.py
index 68e15bbed..2b5d80efb 100644
--- a/tests/test_autodoc.py
+++ b/tests/test_autodoc.py
@@ -853,6 +853,17 @@ def test_generate():
assert_result_contains(' .. py:method:: CustomDataDescriptor.meth()',
'module', 'test_autodoc')
+ # test mocked module imports
+ options.members = ['TestAutodoc']
+ options.undoc_members = False
+ assert_result_contains('.. py:class:: TestAutodoc',
+ 'module', 'autodoc_missing_imports')
+ assert_result_contains(' .. py:method:: TestAutodoc.decoratedMethod()',
+ 'module', 'autodoc_missing_imports')
+ options.members = ['decoratedFunction']
+ assert_result_contains('.. py:function:: decoratedFunction()',
+ 'module', 'autodoc_missing_imports')
+
# --- generate fodder ------------
__all__ = ['Class']