Commit aa4bbb61 authored by Xavier Thompson's avatar Xavier Thompson

Add unit test for cypclass dict membership tests

parent 08bda787
......@@ -183,6 +183,21 @@ def test_update():
return 0
return 1
def test_contains():
"""
>>> test_contains()
1
"""
d = cypdict[Index, double]()
for i in range(10):
index = Index(i)
if index in d:
return 0
d[index] = <double> i
if index not in d:
return 0
return 1
def test_nonexistent_getitem_exception():
"""
>>> test_nonexistent_getitem_exception()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment