# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1289507431 -3600 # Node ID 6d6be528405608135722f46b3d19f2db895893b6 # Parent 045120d3a110c34a0bd7b97a9ebf69f7244b6af3 tests: make assertMultiLineEqual call super, if possible. Python 2.7 provides such a method. diff --git a/tests/test_util.py b/tests/test_util.py --- a/tests/test_util.py +++ b/tests/test_util.py @@ -405,6 +405,12 @@ class TestBase(unittest.TestCase): def assertMultiLineEqual(self, first, second, msg=None): """Assert that two multi-line strings are equal. (Based on Py3k code.) """ + try: + return super(TestBase, self).assertMultiLineEqual(first, second, + msg) + except AttributeError: + pass + self.assert_(isinstance(first, str), ('First argument is not a string')) self.assert_(isinstance(second, str),