Skip to content

Commit 6d53fe6

Browse files
committed
Add more tests for class doc
1 parent ab3cde7 commit 6d53fe6

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/snippets/class.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,31 @@ def f(self):
116116
assert type(a) is super
117117
assert a.conjugate() == 1
118118

119+
120+
class T1:
121+
"test1"
122+
123+
assert T1.__doc__ == "test1"
124+
125+
class T2:
126+
'''test2'''
127+
128+
assert T2.__doc__ == "test2"
129+
130+
class T3:
131+
"""
132+
test3
133+
"""
134+
135+
assert T3.__doc__ == "\n test3\n "
136+
137+
class T4:
138+
139+
"""test4"""
140+
141+
def t1(self):
142+
"""t1"""
143+
pass
144+
145+
assert T4.__doc__ == "test4"
146+
assert T4.t1.__doc__ == "t1"

0 commit comments

Comments
 (0)