comparison tests/test_util.py @ 1038:aa043f64d8b7

tests: fix syntax incompatible with Python 2.4
author Dan Villiom Podlaski Christiansen <dan@cabo.dk>
date Fri, 02 Aug 2013 17:34:05 +0200
parents 6945d3359456
children 70090e2ee262
comparison
equal deleted inserted replaced
1037:2316f2623dd4 1038:aa043f64d8b7
280 # setups. 280 # setups.
281 self.patch = (ui.ui.write_err, ui.ui.write) 281 self.patch = (ui.ui.write_err, ui.ui.write)
282 setattr(ui.ui, self.patch[0].func_name, self.patch[1]) 282 setattr(ui.ui, self.patch[0].func_name, self.patch[1])
283 283
284 def setup_svn_config(self, config): 284 def setup_svn_config(self, config):
285 with open(self.config_dir + '/config', 'w') as c: 285 c = open(self.config_dir + '/config', 'w')
286 try:
286 c.write(config) 287 c.write(config)
288 finally:
289 c.close()
287 290
288 def _makerepopath(self): 291 def _makerepopath(self):
289 self.repocount += 1 292 self.repocount += 1
290 return '%s/testrepo-%d' % (self.tmpdir, self.repocount) 293 return '%s/testrepo-%d' % (self.tmpdir, self.repocount)
291 294