summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-viewcode-find/not_a_package/submodule.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/roots/test-ext-viewcode-find/not_a_package/submodule.py')
-rw-r--r--tests/roots/test-ext-viewcode-find/not_a_package/submodule.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/roots/test-ext-viewcode-find/not_a_package/submodule.py b/tests/roots/test-ext-viewcode-find/not_a_package/submodule.py
new file mode 100644
index 0000000..ba8be78
--- /dev/null
+++ b/tests/roots/test-ext-viewcode-find/not_a_package/submodule.py
@@ -0,0 +1,31 @@
+"""
+submodule
+"""
+raise RuntimeError('This module should not get imported')
+
+
+def decorator(f):
+ return f
+
+
+@decorator
+def func1(a, b):
+ """
+ this is func1
+ """
+ return a, b
+
+
+@decorator
+class Class1:
+ """
+ this is Class1
+ """
+
+
+class Class3:
+ """
+ this is Class3
+ """
+ class_attr = 42
+ """this is the class attribute class_attr"""