Changeset - 60c48410996e
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-07-06 00:12:29
marcin@python-works.com
fixed nose_parametrized for py25 compat
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/tests/nose_parametrized.py
Show inline comments
 
@@ -155,13 +155,13 @@ def imported_from_test():
 
    return False
 

	
 

	
 
def assert_raises(func, exc_type, str_contains=None, repr_contains=None):
 
    try:
 
        func()
 
    except exc_type as e:
 
    except exc_type, e:
 
        if str_contains is not None and str_contains not in str(e):
 
            raise AssertionError("%s raised, but %r does not contain %r"
 
                                 % (exc_type, str(e), str_contains))
 
        if repr_contains is not None and repr_contains not in repr(e):
 
            raise AssertionError("%s raised, but %r does not contain %r"
 
                                 % (exc_type, repr(e), repr_contains))
0 comments (0 inline, 0 general)