Skip to content

Commit a010b04

Browse files
advikkabraczgdp1807
authored andcommitted
Add tests
1 parent 320192d commit a010b04

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

integration_tests/test_membership_01.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ def test_int_dict():
66
i = 4
77
assert (i in a)
88

9+
a = {}
10+
assert (1 not in a)
11+
912
def test_str_dict():
1013
a: dict[str, str] = {'a':'1', 'b':'2', 'c':'3'}
1114
i: str
@@ -14,6 +17,9 @@ def test_str_dict():
1417
i = 'c'
1518
assert (i in a)
1619

20+
a = {}
21+
assert ('a' not in a)
22+
1723
def test_int_set():
1824
a: set[i32] = {1, 2, 3, 4}
1925
i: i32
@@ -22,6 +28,9 @@ def test_int_set():
2228
i = 4
2329
assert (i in a)
2430

31+
a = set()
32+
assert (1 not in a)
33+
2534
def test_str_set():
2635
a: set[str] = {'a', 'b', 'c', 'e', 'f'}
2736
i: str
@@ -30,6 +39,9 @@ def test_str_set():
3039
i = 'c'
3140
assert (i in a)
3241

42+
a = set()
43+
assert ('a' not in a)
44+
3345
test_int_dict()
3446
test_str_dict()
3547
test_int_set()

0 commit comments

Comments
 (0)