Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
aa4bbb61
Commit
aa4bbb61
authored
Sep 01, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add unit test for cypclass dict membership tests
parent
08bda787
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
tests/run/cypclass_builtin_dict.pyx
tests/run/cypclass_builtin_dict.pyx
+15
-0
No files found.
tests/run/cypclass_builtin_dict.pyx
View file @
aa4bbb61
...
...
@@ -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()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment