Commit 117a5caf authored by Stefan Behnel's avatar Stefan Behnel

test fix for Py<2.5

parent d77ed0aa
from __future__ import with_statement
import sys
def typename(t):
return u"<type '%s'>" % type(t).__name__
name = type(t).__name__
if sys.version_info < (2,5):
if name == 'classobj' and issubclass(t, MyException):
name = 'type'
elif name == 'instance' and isinstance(t, MyException):
name = 'MyException'
return u"<type '%s'>" % name
class MyException(Exception):
pass
......
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