Mercurial > hgsubversion
diff tests/test_util.py @ 743:045120d3a110
test_utility_commands: use self.assertMultiLineEqual().
The previous assertStringEqual() utility method pointed to standard
output. This is fairly annoying when running our own test-runner as it
suppresses that output. The assertMultiLineEqual() method shows
essentially the same information in the AssertionError itself.
While at it, all other comparisons that contain line-breaks are made
to use assertMultiLineEqual().
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Thu, 11 Nov 2010 21:30:31 +0100 |
parents | e24fb3e27ec9 |
children | 6d6be5284056 |
line wrap: on
line diff
--- a/tests/test_util.py +++ b/tests/test_util.py @@ -271,17 +271,6 @@ class TestBase(unittest.TestCase): _verify_our_modules() - def assertStringEqual(self, l, r): - try: - self.assertEqual(l, r, 'failed string equality check, see stdout for details') - except: - add_nl = lambda li: map(lambda x: x+'\n', li) - print 'failed expectation:' - print ''.join(difflib.unified_diff( - add_nl(l.splitlines()), add_nl(r.splitlines()), - fromfile='expected', tofile='got')) - raise - def ui(self, stupid=False, layout='auto'): return testui(stupid, layout)