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
8a8c8d27
Commit
8a8c8d27
authored
Apr 06, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extend "struct_conversion" test with some more type conversions
parent
c25a6167
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
tests/run/struct_conversion.pyx
tests/run/struct_conversion.pyx
+3
-3
No files found.
tests/run/struct_conversion.pyx
View file @
8a8c8d27
...
...
@@ -3,7 +3,7 @@ cdef struct Point:
double
y
int
color
def
test_constructor
(
x
,
y
,
color
):
def
test_constructor
(
x
,
y
,
int
color
):
"""
>>> sorted(test_constructor(1,2,255).items())
[('color', 255), ('x', 1.0), ('y', 2.0)]
...
...
@@ -14,7 +14,7 @@ def test_constructor(x, y, color):
return
p
def
return_constructor
(
x
,
y
,
color
):
def
return_constructor
(
x
,
y
,
int
color
):
"""
>>> sorted(return_constructor(1,2,255).items())
[('color', 255), ('x', 1.0), ('y', 2.0)]
...
...
@@ -37,7 +37,7 @@ def test_constructor_kwds(x, y, color):
return
p
def
return_constructor_kwds
(
x
,
y
,
color
):
def
return_constructor_kwds
(
double
x
,
y
,
color
):
"""
>>> sorted(return_constructor_kwds(1.25, 2.5, 128).items())
[('color', 128), ('x', 1.25), ('y', 2.5)]
...
...
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