comparison tests/test_util.py @ 896:04dfc23688b9

allow Python 2.7 to show medium-size multiline diffs when tests fail
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Sat, 12 May 2012 16:19:59 +0200
parents 78db88de9622
children c4ee11a5d04c
comparison
equal deleted inserted replaced
895:5b9f17e34126 896:04dfc23688b9
234 return stdout.strip() 234 return stdout.strip()
235 235
236 class TestBase(unittest.TestCase): 236 class TestBase(unittest.TestCase):
237 def setUp(self): 237 def setUp(self):
238 _verify_our_modules() 238 _verify_our_modules()
239
240 # the Python 2.7 default of 640 is obnoxiously low
241 self.maxDiff = 4096
239 242
240 self.oldenv = dict([(k, os.environ.get(k, None),) for k in 243 self.oldenv = dict([(k, os.environ.get(k, None),) for k in
241 ('LANG', 'LC_ALL', 'HGRCPATH',)]) 244 ('LANG', 'LC_ALL', 'HGRCPATH',)])
242 self.oldt = i18n.t 245 self.oldt = i18n.t
243 os.environ['LANG'] = os.environ['LC_ALL'] = 'C' 246 os.environ['LANG'] = os.environ['LC_ALL'] = 'C'