summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorguibog <guibog@douban.com>2013-10-23 16:36:45 +0800
committerguibog <guibog@douban.com>2013-10-23 16:36:45 +0800
commit10e786edac3809660e9129fe53f5e7e05cc9429e (patch)
tree635e995e667706102e8fdb039ba2d968f7471f60 /tests
parenta56b65634bf3fe57af58e781674ef0be339be2fe (diff)
downloadsphinx-10e786edac3809660e9129fe53f5e7e05cc9429e.tar.gz
autodoc extension: add autodoc_mock_imports config value
Diffstat (limited to 'tests')
-rw-r--r--tests/root/autodoc.txt2
-rw-r--r--tests/root/autodoc_missing_imports.py9
-rw-r--r--tests/root/conf.py7
3 files changed, 18 insertions, 0 deletions
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')