8000 added a few tests for collection mixins · pythonnet/pythonnet@b77b7ce · GitHub
[go: up one dir, main page]

Skip to content

Commit b77b7ce

Browse files
committed
added a few tests for collection mixins
1 parent 38ac73b commit b77b7ce

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[int, str]()
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)
0