Skip to content

Commit 73b0a89

Browse files
authored
Merge pull request #196 from certik/str3
Add a test for str as args and return values
2 parents db38d0a + 34952a3 commit 73b0a89

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

integration_tests/run_tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"expr_04.py",
1313
"expr_05.py",
1414
"test_str_01.py",
15+
"test_str_02.py",
1516
"modules_01.py",
1617
#"modules_02.py",
1718
"test_math.py",

integration_tests/test_str_02.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
def f():
2+
x: str
3+
x = "abcdefghijkl"
4+
x = x + "123"
5+
assert x == "abcdefghijkl123"
6+
g(x)
7+
y: str
8+
y = h(x)
9+
print(y)
10+
assert y == "abcdefghijkl123|x"
11+
12+
def g(x: str):
13+
print(x)
14+
assert x == "abcdefghijkl123"
15+
16+
def h(x: str) -> str:
17+
return x + "|x"
18+
19+
20+
f()

0 commit comments

Comments
 (0)