FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
pythonnet/tests/test_collection_mixins.py at noncopyableanalyzer · pythonnet/pythonnet · GitHub
pythonnet
pythonnet
Repository navigation
Code
Issues
147
(147)
Pull requests
11
(11)
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
pythonnet
/
tests
/
test_collection_mixins.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
23 lines (20 loc) · 521 Bytes
Breadcrumbs
pythonnet
/
tests
/
test_collection_mixins.py
Copy path
File metadata and controls
23 lines (20 loc) · 521 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import
System
.
Collections
.
Generic
as
C
def
test_contains
():
l
=
C
.
List
[
int
]()
l
.
Add
(
42
)
assert
42
in
l
assert
43
not
in
l
def
test_dict_items
():
d
=
C
.
Dictionary
[
int
,
str
]()
d
[
42
]
=
"a"
items
=
d
.
items
()
assert
len
(
items
)
==
1
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
Back
|
FazBrowse Home
|
New Git URL