summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-autodoc/target/need_mocks.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/roots/test-ext-autodoc/target/need_mocks.py')
-rw-r--r--tests/roots/test-ext-autodoc/target/need_mocks.py43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/roots/test-ext-autodoc/target/need_mocks.py b/tests/roots/test-ext-autodoc/target/need_mocks.py
new file mode 100644
index 0000000..45b3ade
--- /dev/null
+++ b/tests/roots/test-ext-autodoc/target/need_mocks.py
@@ -0,0 +1,43 @@
+
+import missing_module
+import missing_package1.missing_module1
+from missing_module import missing_name
+from missing_package2 import missing_module2
+from missing_package3.missing_module3 import missing_name
+
+import sphinx.missing_module4
+from sphinx.missing_module4 import missing_name2
+
+
+@missing_name(int)
+def decoratedFunction():
+ """decoratedFunction docstring"""
+ return None
+
+
+def func(arg: missing_module.Class):
+ """a function takes mocked object as an argument"""
+ pass
+
+
+class TestAutodoc(object):
+ """TestAutodoc docstring."""
+
+ #: docstring
+ Alias = missing_module2.Class
+
+ @missing_name
+ def decoratedMethod(self):
+ """TestAutodoc::decoratedMethod docstring"""
+ return None
+
+
+class Inherited(missing_module.Class):
+ """docstring"""
+ pass
+
+
+sphinx.missing_module4.missing_function(len(missing_name2))
+
+#: docstring
+Alias = missing_module2.Class