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
Boxiang Sun
cython
Commits
ab6a352b
Commit
ab6a352b
authored
May 25, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test fixes
parent
afc2a0ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
tests/run/r_delgado_1.pyx
tests/run/r_delgado_1.pyx
+8
-5
tests/run/r_lepage_3.pyx
tests/run/r_lepage_3.pyx
+4
-3
No files found.
tests/run/r_delgado_1.pyx
View file @
ab6a352b
__doc__
=
u"""
try:
eggs().eat()
except RuntimeError, e:
print "%s: %s" % (e.__class__.__name__, e)
>>> try:
... eggs().eat()
... except RuntimeError:
... import sys
... e = sys.exc_info()[1]
... print("%s: %s" % (e.__class__.__name__, e))
RuntimeError: I don't like that
"""
cdef
class
eggs
:
...
...
@@ -11,5 +14,5 @@ cdef class eggs:
pass
def
eat
(
self
):
raise
RuntimeError
(
"I don't like that"
)
raise
RuntimeError
(
u
"I don't like that"
)
tests/run/r_lepage_3.pyx
View file @
ab6a352b
__doc__
=
u"""
g = r_lepage_3.Grail()
g("spam", 42, ["tomato", "sandwich"])
>>> g = Grail()
>>> g("spam", 42, ["tomato", "sandwich"])
Grail called with: spam 42 ['tomato', 'sandwich']
"""
cdef
class
Grail
:
def
__call__
(
self
,
x
,
y
,
z
):
print
"Grail called with:"
,
x
,
y
,
z
print
u
"Grail called with:"
,
x
,
y
,
z
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