root/branches/mk/tests/data/module1.py

Revision 55, 1.7 kB (checked in by mk, 6 years ago)

Created functional tests directory and moved all existing unit tests to separate directory.

Line 
1 """
2 Docstring for module1
3
4 @summary: Code used inside test_code_parser.py unit test.
5 """
6
7 class Class1:
8     """
9     Docstring for Class1
10
11     @see how.Tests#are(performed)
12     """
13
14     def __init__(self):
15         """
16         Methods starting with __ are not skipped
17         """
18         pass
19
20     def __another_method__(self):
21         """Should not be skipped"""
22         pass
23
24     def method1(self):
25         """Docstring for method1"""
26         pass
27
28     def method2(self):
29         "Docstring for method2"
30         pass
31
32     def method3(self):
33         """
34         Docstring for method3
35         """
36         pass
37
38     def method4(self):
39         # No docstring
40         pass
41
42     def method5(self):
43         """Method with few definitions.
44
45         :Word: And its definition.
46         """
47         pass
48
49 class Class2:
50
51     """
52     Docstring one line apart from Class2
53     """
54     pass
55
56
57 def func1():
58     """Docstring for func1"""
59     return
60
61 def func2():
62     "Docstring for func2"
63     return
64
65 def func3():
66     """
67     Docstring for func3
68     """
69     return
70
71 def func4():
72     # No docstring
73     return
74
75 def __func5__(self):
76     """
77     Functions starting with __ are not skipped
78     """
79     return
80
81 def func6():
82     """
83     """
84     pass
85
86 def func7():
87     "Time to get *a bit* of reST."
88     pass
89
90 def func8(argument):
91     """This is test function for the epytext parser.
92
93     @param argument: And you really can't say if this is
94         epytext or javadoc! We count both.
95     """
96     pass
97
98
99 class Class3(object):
100     """
101     New-style class with epytext link: U{http://pycheesecake.org}.
102     """
103     pass
104
105
106 def outer_function(*args):
107     x = 42
108
109     def inner_function():
110         """Short docstring."""
111         pass
112
113     return x
Note: See TracBrowser for help on using the browser.