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
f5921309
Commit
f5921309
authored
May 02, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix test case and make it really test the expected exception type
parent
942e1a85
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
Cython/Compiler/Version.py
Cython/Compiler/Version.py
+1
-1
tests/run/new_style_exceptions.pyx
tests/run/new_style_exceptions.pyx
+6
-2
No files found.
Cython/Compiler/Version.py
View file @
f5921309
version
=
'0.9.6.1
3.1
'
version
=
'0.9.6.1
4
'
tests/run/new_style_exceptions.pyx
View file @
f5921309
...
...
@@ -4,7 +4,7 @@ __doc__ = """
Caught: Exception('hi',)
"""
import
sys
import
sys
,
types
def
test
(
obj
):
print
"Raising: %s%r"
%
(
obj
.
__class__
.
__name__
,
obj
.
args
)
...
...
@@ -12,4 +12,8 @@ def test(obj):
raise
obj
except
:
info
=
sys
.
exc_info
()
print
"Caught: %s%r"
%
(
obj
.
__class__
.
__name__
,
obj
.
args
)
if
sys
.
version_info
>=
(
2
,
5
):
assert
isinstance
(
info
[
0
],
type
)
else
:
assert
isinstance
(
info
[
0
],
types
.
ClassType
)
print
"Caught: %s%r"
%
(
info
[
1
].
__class__
.
__name__
,
info
[
1
].
args
)
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