From 10e786edac3809660e9129fe53f5e7e05cc9429e Mon Sep 17 00:00:00 2001 From: guibog Date: Wed, 23 Oct 2013 16:36:45 +0800 Subject: autodoc extension: add autodoc_mock_imports config value --- tests/root/autodoc.txt | 2 ++ tests/root/autodoc_missing_imports.py | 9 +++++++++ tests/root/conf.py | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 tests/root/autodoc_missing_imports.py (limited to 'tests/root') diff --git a/tests/root/autodoc.txt b/tests/root/autodoc.txt index d4b3404c..aa0dffba 100644 --- a/tests/root/autodoc.txt +++ b/tests/root/autodoc.txt @@ -45,3 +45,5 @@ Just testing a few autodoc possibilities... :members: ca1, ia1 Specific members (2 total) + +.. automodule:: autodoc_missing_imports diff --git a/tests/root/autodoc_missing_imports.py b/tests/root/autodoc_missing_imports.py new file mode 100644 index 00000000..7a717345 --- /dev/null +++ b/tests/root/autodoc_missing_imports.py @@ -0,0 +1,9 @@ + +import missing_module +from missing_module import missing_name +import missing_package1.missing_module1 +from missing_package2 import missing_module2 +from missing_package3.missing_module3 import missing_name + +class TestAutodoc(object): + """TestAutodoc docstring.""" diff --git a/tests/root/conf.py b/tests/root/conf.py index 8025ba33..215cebf9 100644 --- a/tests/root/conf.py +++ b/tests/root/conf.py @@ -71,6 +71,13 @@ autosummary_generate = ['autosummary'] extlinks = {'issue': ('http://bugs.python.org/issue%s', 'issue '), 'pyurl': ('http://python.org/%s', None)} +autodoc_mock_imports = [ + 'missing_module', + 'missing_package1.missing_module1', + 'missing_package2.missing_module2', + 'missing_package3.missing_module3', +] + # modify tags from conf.py tags.add('confpytag') -- cgit v1.2.1 From 2a8cf7c7781a4554adbcb4bae6bec2a40bfc156d Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Sun, 19 Jan 2014 17:46:06 +0100 Subject: The deprecated config values ``exclude_trees``, ``exclude_dirnames`` and ``unused_docs`` have been removed. --- tests/root/conf.py | 1 - 1 file changed, 1 deletion(-) (limited to 'tests/root') diff --git a/tests/root/conf.py b/tests/root/conf.py index cf88c2bb..f0d40148 100644 --- a/tests/root/conf.py +++ b/tests/root/conf.py @@ -23,7 +23,6 @@ copyright = '2010, Georg Brandl & Team' version = '0.6' release = '0.6alpha1' today_fmt = '%B %d, %Y' -# unused_docs = [] exclude_patterns = ['_build', '**/excluded.*'] keep_warnings = True pygments_style = 'sphinx' -- cgit v1.2.1