Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20472f1 commit 23fed20Copy full SHA for 23fed20
integration_tests/test_list_03.py
@@ -49,9 +49,29 @@ def test_list_02_string():
49
for i in range(50):
50
assert x[i] == y[i]
51
52
+
53
+def foo(x: i32) -> list[i32]:
54
+ y: list[i32] = []
55
+ i: i32
56
+ for i in range(x):
57
+ y.append(i+1)
58
+ return y
59
60
61
+def test_list_return():
62
+ x: list[i32]
63
+ x = foo(2)
64
+ assert x[0] == 1
65
+ assert x[1] == 2
66
+ x = foo(5)
67
+ assert x[3] == 4
68
+ assert x[4] == 5
69
70
71
def verify():
72
assert test_list_01(11) == 55
73
assert test_list_02(50) == 3628
74
test_list_02_string()
75
+ test_list_return()
76
77
verify()
0 commit comments