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
64b368a1
Commit
64b368a1
authored
4 years ago
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adapt unit test to conform to new overload rules for cypclasses
parent
387d6f1f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
tests/run/cypclass_new_alloc.pyx
tests/run/cypclass_new_alloc.pyx
+4
-4
No files found.
tests/run/cypclass_new_alloc.pyx
View file @
64b368a1
...
...
@@ -29,13 +29,13 @@ def test_singleton():
cdef
cypclass
Base
:
double
value
__init__
(
self
,
int
a
):
self
.
value
=
(
<
double
>
a
)
*
1.2
__init__
(
self
,
int
a
,
double
b
):
self
.
value
=
(
<
double
>
a
)
*
b
__init__
(
self
,
double
b
):
self
.
value
=
b
Base
__new__
(
alloc
,
int
a
):
Base
__new__
(
alloc
,
int
a
,
double
b
):
return
alloc
()
cdef
cypclass
Derived
(
Base
):
...
...
@@ -48,7 +48,7 @@ def test_changing_init_choice():
6.0
5.0
"""
cdef
Base
base
=
Base
(
5
)
cdef
Base
base
=
Base
(
5
,
1.2
)
cdef
Derived
derived
=
Derived
(
5
)
print
base
.
value
print
derived
.
value
...
...
This diff is collapsed.
Click to expand it.
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