From e3d390e036430b9d7cc4b93679229fe118eb583a Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Wed, 27 May 2015 11:18:54 +0200 Subject: cleanup code with autopep8 run the following command: $ autopep8 -i -r -a -a . --- test/tutils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'test/tutils.py') diff --git a/test/tutils.py b/test/tutils.py index 141979f8..95c8b80a 100644 --- a/test/tutils.py +++ b/test/tutils.py @@ -44,14 +44,14 @@ def raises(exc, obj, *args, **kwargs): :kwargs Arguments to be passed to the callable. """ try: - ret = apply(obj, args, kwargs) - except Exception, v: + ret = obj(*args, **kwargs) + except Exception as v: if isinstance(exc, basestring): if exc.lower() in str(v).lower(): return else: raise AssertionError( - "Expected %s, but caught %s"%( + "Expected %s, but caught %s" % ( repr(str(exc)), v ) ) @@ -60,7 +60,7 @@ def raises(exc, obj, *args, **kwargs): return else: raise AssertionError( - "Expected %s, but caught %s %s"%( + "Expected %s, but caught %s %s" % ( exc.__name__, v.__class__.__name__, str(v) ) ) -- cgit v1.2.3