Mercurial > hgsubversion
comparison 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 |
comparison
equal
deleted
inserted
replaced
81:85dcea81f22b | 82:71de43e9f614 |
---|---|
12 | 12 |
13 import fetch_command | 13 import fetch_command |
14 import push_cmd | 14 import push_cmd |
15 import test_util | 15 import test_util |
16 | 16 |
17 class TestPushRenames(unittest.TestCase): | 17 class TestPushRenames(test_util.TestBase): |
18 def setUp(self): | 18 def setUp(self): |
19 self.oldwd = os.getcwd() | 19 test_util.TestBase.setUp(self) |
20 self.tmpdir = tempfile.mkdtemp('svnwrap_test') | |
21 self.repo_path = '%s/testrepo' % self.tmpdir | |
22 self.wc_path = '%s/testrepo_wc' % self.tmpdir | |
23 test_util.load_fixture_and_fetch('pushrenames.svndump', | 20 test_util.load_fixture_and_fetch('pushrenames.svndump', |
24 self.repo_path, | 21 self.repo_path, |
25 self.wc_path, | 22 self.wc_path, |
26 True) | 23 True) |
27 | |
28 # define this as a property so that it reloads anytime we need it | |
29 @property | |
30 def repo(self): | |
31 return hg.repository(ui.ui(), self.wc_path) | |
32 | |
33 def tearDown(self): | |
34 test_util.rmtree(self.tmpdir) | |
35 os.chdir(self.oldwd) | |
36 | 24 |
37 def _commitchanges(self, repo, changes): | 25 def _commitchanges(self, repo, changes): |
38 parentctx = repo['tip'] | 26 parentctx = repo['tip'] |
39 | 27 |
40 changed, removed = [], [] | 28 changed, removed = [], [] |