Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cf8823f

Browse files
committed
added regression test for "in Dictionary.Keys" check
1 parent 2910800 commit cf8823f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_collection_mixins.py

+7
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@ def test_dict_items():
1414
k,v = items[0]
1515
assert k == 42
1616
assert v == "a"
17+
18+
# regression test for https://github.com/pythonnet/pythonnet/issues/1785
19+
def test_dict_in_keys():
20+
d = C.Dictionary[str, int]()
21+
d["a"] = 42
22+
assert "a" in d.Keys
23+
assert "b" not in d.Keys

0 commit comments

Comments
 (0)