comparison tests/common.py @ 58:3d413c54e048

tests: be prepared for basetest.setUp not being called tests might choose to do something else
author Idan Kamara <idankk86@gmail.com>
date Fri, 19 Aug 2011 20:08:13 +0300
parents eac8be119d81
children 730c42743ba3
comparison
equal deleted inserted replaced
57:2657fd6fef04 58:3d413c54e048
13 # until we can run norepo commands in the cmdserver 13 # until we can run norepo commands in the cmdserver
14 os.system('hg init') 14 os.system('hg init')
15 self.client = hglib.open() 15 self.client = hglib.open()
16 16
17 def tearDown(self): 17 def tearDown(self):
18 shutil.rmtree(self._testtmp) 18 try:
19 shutil.rmtree(self._testtmp)
20 except AttributeError:
21 pass # if our setUp was overriden
19 22
20 def append(self, path, *args): 23 def append(self, path, *args):
21 f = open(path, 'a') 24 f = open(path, 'a')
22 for a in args: 25 for a in args:
23 f.write(str(a)) 26 f.write(str(a))