diff options
Diffstat (limited to 'tests/roots/test-ext-viewcode/spam')
-rw-r--r-- | tests/roots/test-ext-viewcode/spam/__init__.py | 2 | ||||
-rw-r--r-- | tests/roots/test-ext-viewcode/spam/mod1.py | 30 | ||||
-rw-r--r-- | tests/roots/test-ext-viewcode/spam/mod2.py | 22 | ||||
-rw-r--r-- | tests/roots/test-ext-viewcode/spam/mod3.py | 3 |
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..22cc1a0 --- /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(object): + """ + this is Class1 + """ + + +class Class3(object): + """ + 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..92d1961 --- /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(object): + """ + 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',) |