comparison tests/test_util.py @ 148:0c5f6420a8b5

tests: Add an environment variable (HGSUBVERSION_TEST_TEMP) which allows specification of where temporary repositories (both hg and svn) should be created. Set it to a RAM disk to make the tests run faster.
author Augie Fackler <durin42@gmail.com>
date Sat, 20 Dec 2008 19:13:46 -0600
parents 89a737852d33
children d046bef502d7
comparison
equal deleted inserted replaced
147:22162380c4b9 148:0c5f6420a8b5
88 88
89 89
90 class TestBase(unittest.TestCase): 90 class TestBase(unittest.TestCase):
91 def setUp(self): 91 def setUp(self):
92 self.oldwd = os.getcwd() 92 self.oldwd = os.getcwd()
93 self.tmpdir = tempfile.mkdtemp('svnwrap_test') 93 self.tmpdir = tempfile.mkdtemp(
94 'svnwrap_test', dir=os.environ.get('HGSUBVERSION_TEST_TEMP', None))
95
94 self.repo_path = '%s/testrepo' % self.tmpdir 96 self.repo_path = '%s/testrepo' % self.tmpdir
95 self.wc_path = '%s/testrepo_wc' % self.tmpdir 97 self.wc_path = '%s/testrepo_wc' % self.tmpdir
96 self._real_ui = ui.ui 98 self._real_ui = ui.ui
97 ui.ui = MockUI 99 ui.ui = MockUI
98 100