Commit d1401233 authored by Stefan Behnel's avatar Stefan Behnel

fix new memory view error test in Py2.4

parent 8164bb31
# mode: run
# tag: memoryview
cdef double[:] foo(int i):
if i == 1:
......@@ -10,22 +12,23 @@ cdef double[:] foo(int i):
if i == 4:
raise TypeError('dummy')
def propagate(i):
'''
"""
>>> propagate(0)
TypeError('Memoryview return value is not initialized',)
TypeError('Memoryview return value is not initialized')
>>> propagate(1)
AttributeError('dummy',)
AttributeError('dummy')
>>> propagate(2)
RuntimeError('dummy',)
RuntimeError('dummy')
>>> propagate(3)
ValueError('dummy',)
ValueError('dummy')
>>> propagate(4)
TypeError('dummy',)
'''
TypeError('dummy')
"""
try:
foo(i)
except Exception as e:
print repr(e)
print '%s(%r)' % (e.__class__.__name__, e.args[0])
else:
print 'Exception sublass not raised'
print 'Exception subclass not raised'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment