this should test and fix the same issue that was committed in

the pypy svn-repo as r72534

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-04-23 19:28:41 +02:00
parent b3a05b545e
commit 0b24a70279
2 changed files with 11 additions and 1 deletions

View File

@@ -100,7 +100,7 @@ def raises(ExpectedException, *args, **kwargs):
k = ", ".join(["%s=%r" % x for x in kwargs.items()])
if k:
k = ', ' + k
expr = '%s(%r%s)' %(func.__name__, args, k)
expr = '%s(%r%s)' %(getattr(func, '__name__', func), args, k)
raise ExceptionFailure(msg="DID NOT RAISE",
expr=args, expected=ExpectedException)