Skip to content

Commit c76b318

Browse files
committed
Add more tests for function doc
1 parent f994f86 commit c76b318

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

tests/snippets/function.py

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,35 @@ def foo():
55
assert foo() == 42
66
assert foo.__doc__ == "test"
77

8-
98
def my_func(a,):
109
return a+2
1110

1211
assert my_func(2) == 4
12+
13+
14+
def f1():
15+
16+
"""test1"""
17+
pass
18+
19+
assert f1.__doc__ == "test1"
20+
21+
def f2():
22+
'''test2'''
23+
pass
24+
25+
assert f2.__doc__ == "test2"
26+
27+
def f3():
28+
"""
29+
test3
30+
"""
31+
pass
32+
33+
assert f3.__doc__ == "\n test3\n "
34+
35+
def f4():
36+
"test4"
37+
pass
38+
39+
assert f4.__doc__ == "test4"

0 commit comments

Comments
 (0)