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
Gwenaël Samain
cython
Commits
cf42b0a0
Commit
cf42b0a0
authored
Sep 14, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean up test a little
--HG-- extra : rebase_source : 7b763fbb0f2485056ec4d2f53a5ec76dc7be9203
parent
80a05e8f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
tests/run/extcmethod.pyx
tests/run/extcmethod.pyx
+7
-5
No files found.
tests/run/extcmethod.pyx
View file @
cf42b0a0
# mode: run
cdef
class
Spam
:
cdef
int
tons
cdef
void
add_tons
(
self
,
int
x
):
self
.
tons
=
self
.
tons
+
x
self
.
tons
+=
x
cdef
void
eat
(
self
):
self
.
tons
=
0
...
...
@@ -11,10 +13,10 @@ cdef class Spam:
def
lift
(
self
):
print
self
.
tons
cdef
class
Su
per
Spam
(
Spam
):
cdef
class
Su
b
Spam
(
Spam
):
cdef
void
add_tons
(
self
,
int
x
):
self
.
tons
=
self
.
tons
+
2
*
x
self
.
tons
+=
2
*
x
def
test
():
"""
...
...
@@ -25,13 +27,13 @@ def test():
5
"""
cdef
Spam
s
cdef
Su
per
Spam
ss
cdef
Su
b
Spam
ss
s
=
Spam
()
s
.
eat
()
s
.
add_tons
(
5
)
s
.
lift
()
ss
=
Su
per
Spam
()
ss
=
Su
b
Spam
()
ss
.
eat
()
ss
.
lift
()
...
...
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