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
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
28540988
Commit
28540988
authored
Nov 01, 2014
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not depend on dict serialisation order in doctest
parent
e6c94984
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
tests/run/carray_coercion.pyx
tests/run/carray_coercion.pyx
+16
-16
No files found.
tests/run/carray_coercion.pyx
View file @
28540988
...
...
@@ -272,10 +272,10 @@ def to_struct_with_array(x):
... ])
>>> x['a'], y['a']
(11, 21)
>>> sorted(
v.items(
) for v in x['b'])
[[('
y', 13.0), ('x', 12)], [('y', 15.0), ('x', 14
)]]
>>> sorted(
v.items(
) for v in y['b'])
[[('
y', 23.0), ('x', 22)], [('y', 25.0), ('x', 24
)]]
>>> sorted(
sorted(v.items()
) for v in x['b'])
[[('
x', 12), ('y', 13.0)], [('x', 14), ('y', 15.0
)]]
>>> sorted(
sorted(v.items()
) for v in y['b'])
[[('
x', 22), ('y', 23.0)], [('x', 24), ('y', 25.0
)]]
>>> x, y = to_struct_with_array(iter([
... {'a': 11, 'b': iter([{'x': 12, 'y': 13}, {'x': 14, 'y': 15}])},
...
...
@@ -283,10 +283,10 @@ def to_struct_with_array(x):
... ]))
>>> x['a'], y['a']
(11, 21)
>>> sorted(
v.items(
) for v in x['b'])
[[('
y', 13.0), ('x', 12)], [('y', 15.0), ('x', 14
)]]
>>> sorted(
v.items(
) for v in y['b'])
[[('
y', 23.0), ('x', 22)], [('y', 25.0), ('x', 24
)]]
>>> sorted(
sorted(v.items()
) for v in x['b'])
[[('
x', 12), ('y', 13.0)], [('x', 14), ('y', 15.0
)]]
>>> sorted(
sorted(v.items()
) for v in y['b'])
[[('
x', 22), ('y', 23.0)], [('x', 24), ('y', 25.0
)]]
"""
cdef
StructWithArray
[
2
]
v
v
=
x
...
...
@@ -301,10 +301,10 @@ def to_struct_with_array_slice(x):
... ])
>>> x['a'], y['a']
(11, 21)
>>> sorted(
v.items(
) for v in x['b'])
[[('
y', 13.0), ('x', 12)], [('y', 15.0), ('x', 14
)]]
>>> sorted(
v.items(
) for v in y['b'])
[[('
y', 23.0), ('x', 22)], [('y', 25.0), ('x', 24
)]]
>>> sorted(
sorted(v.items()
) for v in x['b'])
[[('
x', 12), ('y', 13.0)], [('x', 14), ('y', 15.0
)]]
>>> sorted(
sorted(v.items()
) for v in y['b'])
[[('
x', 22), ('y', 23.0)], [('x', 24), ('y', 25.0
)]]
>>> x, y = to_struct_with_array_slice(iter([
... {'a': 11, 'b': iter([{'x': 12, 'y': 13}, {'x': 14, 'y': 15}])},
...
...
@@ -312,10 +312,10 @@ def to_struct_with_array_slice(x):
... ]))
>>> x['a'], y['a']
(11, 21)
>>> sorted(
v.items(
) for v in x['b'])
[[('
y', 13.0), ('x', 12)], [('y', 15.0), ('x', 14
)]]
>>> sorted(
v.items(
) for v in y['b'])
[[('
y', 23.0), ('x', 22)], [('y', 25.0), ('x', 24
)]]
>>> sorted(
sorted(v.items()
) for v in x['b'])
[[('
x', 12), ('y', 13.0)], [('x', 14), ('y', 15.0
)]]
>>> sorted(
sorted(v.items()
) for v in y['b'])
[[('
x', 22), ('y', 23.0)], [('x', 24), ('y', 25.0
)]]
"""
cdef
StructWithArray
[
2
]
v
v
[:]
=
x
...
...
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