mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-08 12:40:17 +00:00
restore test, add walrus
This commit is contained in:
parent
b66ef11dac
commit
72e36997ca
@ -1,17 +1,6 @@
|
|||||||
## Function Tests.
|
## Function Tests.
|
||||||
#a := 1
|
|
||||||
#_b = (1, 2)
|
|
||||||
#(d := 4) + 6
|
|
||||||
#(D := 4)
|
|
||||||
#assert D == 4
|
|
||||||
#x = D + 1
|
|
||||||
x = (a := 3,4)
|
|
||||||
y = (a := 3)
|
|
||||||
print(y)
|
|
||||||
#assert False # (D := 4)==4
|
|
||||||
# b = (d := 4) + (c := 4)
|
|
||||||
# c = (d := 2) + 1
|
|
||||||
# b = (x := a + 1) + 2
|
|
||||||
def f1():
|
def f1():
|
||||||
return 'f1'
|
return 'f1'
|
||||||
assert f1() == 'f1'
|
assert f1() == 'f1'
|
||||||
|
|||||||
@ -4,3 +4,4 @@ assert ( y := 1) + 2 == 3
|
|||||||
a = (y := 4) + 5
|
a = (y := 4) + 5
|
||||||
assert a == 9
|
assert a == 9
|
||||||
assert y == 4
|
assert y == 4
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user