Visitar URL original
Multiple fixes related to Dictionary.Keys bug by lostmsu · Pull Request #1786 · pythonnet/pythonnet · GitHub
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
added regression test for "in Dictionary.Keys" check
  • Loading branch information
lostmsu committed May 7, 2022
commit cf8823fa941842cfd19ad808f04bc6aa6d0b7970
7 changes: 7 additions & 0 deletions tests/test_collection_mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,10 @@ def test_dict_items():
k,v = items[0]
assert k == 42
assert v == "a"

# regression test for https://github.com/pythonnet/pythonnet/issues/1785
def test_dict_in_keys():
d = C.Dictionary[str, int]()
d["a"] = 42
assert "a" in d.Keys
assert "b" not in d.Keys