summaryrefslogtreecommitdiffstats
path: root/tests/roots/test-ext-viewcode/spam
diff options
context:
space:
mode:
Diffstat (limited to 'tests/roots/test-ext-viewcode/spam')
-rw-r--r--tests/roots/test-ext-viewcode/spam/__init__.py2
-rw-r--r--tests/roots/test-ext-viewcode/spam/mod1.py30
-rw-r--r--tests/roots/test-ext-viewcode/spam/mod2.py22
-rw-r--r--tests/roots/test-ext-viewcode/spam/mod3.py3
4 files changed, 57 insertions, 0 deletions
diff --git a/tests/roots/test-ext-viewcode/spam/__init__.py b/tests/roots/test-ext-viewcode/spam/__init__.py
new file mode 100644
index 0000000..6219042
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/spam/__init__.py
@@ -0,0 +1,2 @@
+from .mod1 import Class1, func1
+from .mod2 import Class2, func2
diff --git a/tests/roots/test-ext-viewcode/spam/mod1.py b/tests/roots/test-ext-viewcode/spam/mod1.py
new file mode 100644
index 0000000..a078328
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/spam/mod1.py
@@ -0,0 +1,30 @@
+"""
+mod1
+"""
+
+
+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"""
diff --git a/tests/roots/test-ext-viewcode/spam/mod2.py b/tests/roots/test-ext-viewcode/spam/mod2.py
new file mode 100644
index 0000000..72cb089
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/spam/mod2.py
@@ -0,0 +1,22 @@
+"""
+mod2
+"""
+
+
+def decorator(f):
+ return f
+
+
+@decorator
+def func2(a, b):
+ """
+ this is func2
+ """
+ return a, b
+
+
+@decorator
+class Class2:
+ """
+ this is Class2
+ """
diff --git a/tests/roots/test-ext-viewcode/spam/mod3.py b/tests/roots/test-ext-viewcode/spam/mod3.py
new file mode 100644
index 0000000..812c9b5
--- /dev/null
+++ b/tests/roots/test-ext-viewcode/spam/mod3.py
@@ -0,0 +1,3 @@
+from spam.mod1 import Class3
+
+__all__ = ('Class3',)