comparison tests/test_util.py @ 231:b1543f243910

tests: Start providing our own custom hgrc for testing purposes.
author Augie Fackler <durin42@gmail.com>
date Tue, 31 Mar 2009 10:50:21 -0500
parents 13ae1bded5e7
children 4950b18cf949
comparison
equal deleted inserted replaced
230:4c3bad24f950 231:b1543f243910
95 class TestBase(unittest.TestCase): 95 class TestBase(unittest.TestCase):
96 def setUp(self): 96 def setUp(self):
97 self.oldwd = os.getcwd() 97 self.oldwd = os.getcwd()
98 self.tmpdir = tempfile.mkdtemp( 98 self.tmpdir = tempfile.mkdtemp(
99 'svnwrap_test', dir=os.environ.get('HGSUBVERSION_TEST_TEMP', None)) 99 'svnwrap_test', dir=os.environ.get('HGSUBVERSION_TEST_TEMP', None))
100 self.hgrc = os.path.join(self.tmpdir, '.hgrc')
101 os.environ['HGRCPATH'] = self.hgrc
102 rc = open(self.hgrc, 'w')
103 rc.write('[extensions]\nhgsubversion=')
100 104
101 self.repo_path = '%s/testrepo' % self.tmpdir 105 self.repo_path = '%s/testrepo' % self.tmpdir
102 self.wc_path = '%s/testrepo_wc' % self.tmpdir 106 self.wc_path = '%s/testrepo_wc' % self.tmpdir
103 self._real_ui = ui.ui 107 self._real_ui = ui.ui
104 ui.ui = MockUI 108 ui.ui = MockUI