projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ed398d7
)
make test for new style exceptions run on all Python versions by not actually testing...
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 2 May 2008 07:08:08 +0000
(09:08 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 2 May 2008 07:08:08 +0000
(09:08 +0200)
tests/run/new_style_exceptions.pyx
patch
|
blob
|
history
diff --git
a/tests/run/new_style_exceptions.pyx
b/tests/run/new_style_exceptions.pyx
index 34c8bd6621dfa81e7f06b0414d4105b5ab4329e8..4dfcf375bb26d25e1da8a79612fea2bb9bf4746c 100644
(file)
--- a/
tests/run/new_style_exceptions.pyx
+++ b/
tests/run/new_style_exceptions.pyx
@@
-1,15
+1,15
@@
__doc__ = """
>>> test(Exception('hi'))
Raising: Exception('hi',)
- Caught:
<type 'exceptions.Exception'>
Exception('hi',)
+ Caught: Exception('hi',)
"""
import sys
def test(obj):
- print "Raising:
", repr(obj
)
+ print "Raising:
%s%r" % (obj.__class__.__name__, obj.args
)
try:
raise obj
except:
info = sys.exc_info()
- print "Caught: %
r %r" % (info[0], info[1]
)
+ print "Caught: %
s%r" % (obj.__class__.__name__, obj.args
)