Mercurial > hgsubversion
diff tests/test_push_renames.py @ 82:71de43e9f614
Extract PushTest common code into test_util.TestBase
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 14 Nov 2008 16:18:24 -0600 |
parents | 072010a271c6 |
children | 01e747937d35 |
line wrap: on
line diff
--- a/tests/test_push_renames.py +++ b/tests/test_push_renames.py @@ -14,26 +14,14 @@ import fetch_command import push_cmd import test_util -class TestPushRenames(unittest.TestCase): +class TestPushRenames(test_util.TestBase): def setUp(self): - self.oldwd = os.getcwd() - self.tmpdir = tempfile.mkdtemp('svnwrap_test') - self.repo_path = '%s/testrepo' % self.tmpdir - self.wc_path = '%s/testrepo_wc' % self.tmpdir + test_util.TestBase.setUp(self) test_util.load_fixture_and_fetch('pushrenames.svndump', self.repo_path, self.wc_path, True) - # define this as a property so that it reloads anytime we need it - @property - def repo(self): - return hg.repository(ui.ui(), self.wc_path) - - def tearDown(self): - test_util.rmtree(self.tmpdir) - os.chdir(self.oldwd) - def _commitchanges(self, repo, changes): parentctx = repo['tip']