Added __contains__ to stl bindings for maps (#1767)

* Added __contains__ to stl bindings for maps
This commit is contained in:
Blake Thompson
2019-06-10 14:01:11 -05:00
committed by Wenzel Jakob
parent c251434011
commit 30c0352348
2 changed files with 11 additions and 0 deletions

View File

@@ -56,7 +56,9 @@ def test_map(doc):
"""std::map <-> dict"""
d = m.cast_map()
assert d == {"key": "value"}
assert "key" in d
d["key2"] = "value2"
assert "key2" in d
assert m.load_map(d)
assert doc(m.cast_map) == "cast_map() -> Dict[str, str]"