Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
ec53b07e
Commit
ec53b07e
authored
Jan 08, 2017
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add OrderedDict test for PEP 468 (guaranteed ordered of kwargs)
parent
d15bb262
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Lib/test/test_ordered_dict.py
Lib/test/test_ordered_dict.py
+8
-0
No files found.
Lib/test/test_ordered_dict.py
View file @
ec53b07e
...
@@ -52,6 +52,14 @@ class OrderedDictTests:
...
@@ -52,6 +52,14 @@ class OrderedDictTests:
self
.
assertEqual
(
list
(
d
.
items
()),
self
.
assertEqual
(
list
(
d
.
items
()),
[(
'a'
,
1
),
(
'b'
,
2
),
(
'c'
,
3
),
(
'd'
,
4
),
(
'e'
,
5
),
(
'f'
,
6
),
(
'g'
,
7
)])
[(
'a'
,
1
),
(
'b'
,
2
),
(
'c'
,
3
),
(
'd'
,
4
),
(
'e'
,
5
),
(
'f'
,
6
),
(
'g'
,
7
)])
def
test_468
(
self
):
OrderedDict
=
self
.
OrderedDict
items
=
[(
'a'
,
1
),
(
'b'
,
2
),
(
'c'
,
3
),
(
'd'
,
4
),
(
'e'
,
5
),
(
'f'
,
6
),
(
'g'
,
7
)]
shuffle
(
items
)
argdict
=
OrderedDict
(
items
)
d
=
OrderedDict
(
**
argdict
)
self
.
assertEqual
(
list
(
d
.
items
()),
items
)
def
test_update
(
self
):
def
test_update
(
self
):
OrderedDict
=
self
.
OrderedDict
OrderedDict
=
self
.
OrderedDict
with
self
.
assertRaises
(
TypeError
):
with
self
.
assertRaises
(
TypeError
):
...
...
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