Skip to content

Commit 59599c4

Browse files
committed
Added tests
1 parent f6613bf commit 59599c4

File tree

1 file changed

+18
-6
lines changed

1 file changed

+18
-6
lines changed

integration_tests/test_gruntz.py

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,28 @@
22
from sympy import Symbol
33

44
def mmrv(e: S, x: S) -> list[S]:
5-
l: list[S] = []
65
if not e.has(x):
7-
return l
6+
list0: list[S] = []
7+
return list0
8+
elif e == x:
9+
list1: list[S] = [x]
10+
return list1
811
else:
912
raise
1013

11-
def test_mrv1():
14+
def test_mrv():
15+
# Case 1
1216
x: S = Symbol("x")
1317
y: S = Symbol("y")
14-
ans: list[S] = mmrv(y, x)
15-
assert len(ans) == 0
18+
ans1: list[S] = mmrv(y, x)
19+
print(ans1)
20+
assert len(ans1) == 0
1621

17-
test_mrv1()
22+
# Case 2
23+
ans2: list[S] = mmrv(x, x)
24+
ele1: S = ans2[0]
25+
print(ele1)
26+
assert ele1 == x
27+
assert len(ans2) == 1
28+
29+
test_mrv()

0 commit comments

Comments
 (0)