Skip to content

Commit 40e5893

Browse files
committed
added a few tests for collection mixins
1 parent 2462d2b commit 40e5893

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/test_collection_mixins.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import System.Collections.Generic as C
2+
3+
def test_contains():
4+
l = C.List[int]()
5+
l.Add(42)
6+
assert 42 in l
7+
assert 43 not in l
8+
9+
def test_dict_items():
10+
d = C.Dictionary[str, int]()
11+
d[42] = "a"
12+
items = d.items()
13+
assert len(items) == 1
14+
k,v = items[0]
15+
assert k == 42
16+
assert v == "a"

0 commit comments

Comments
 (0)