Mercurial > hgsubversion
comparison tests/test_fetch_renames.py @ 91:7d10165cf3d9
tests: Mock the mercurial.ui.ui class like we really should to capture output.
Has the nice side effect that we can use nose 0.11's multiprocess plugin.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 14 Nov 2008 16:52:30 -0600 |
parents | 072010a271c6 |
children | a3b717e4abf5 |
comparison
equal
deleted
inserted
replaced
90:4c419603d41b | 91:7d10165cf3d9 |
---|---|
10 | 10 |
11 import fetch_command | 11 import fetch_command |
12 import test_util | 12 import test_util |
13 | 13 |
14 | 14 |
15 class TestFetchRenames(unittest.TestCase): | 15 class TestFetchRenames(test_util.TestBase): |
16 def setUp(self): | |
17 self.oldwd = os.getcwd() | |
18 self.tmpdir = tempfile.mkdtemp('svnwrap_test') | |
19 self.repo_path = '%s/testrepo' % self.tmpdir | |
20 self.wc_path = '%s/testrepo_wc' % self.tmpdir | |
21 | |
22 def tearDown(self): | |
23 test_util.rmtree(self.tmpdir) | |
24 os.chdir(self.oldwd) | |
25 | |
26 def _load_fixture_and_fetch(self, fixture_name, stupid): | 16 def _load_fixture_and_fetch(self, fixture_name, stupid): |
27 return test_util.load_fixture_and_fetch(fixture_name, self.repo_path, | 17 return test_util.load_fixture_and_fetch(fixture_name, self.repo_path, |
28 self.wc_path, stupid=stupid) | 18 self.wc_path, stupid=stupid) |
29 | 19 |
30 def _debug_print_copies(self, repo): | 20 def _debug_print_copies(self, repo): |
41 # self._debug_print_copies(repo) | 31 # self._debug_print_copies(repo) |
42 | 32 |
43 # Map revnum to mappings of dest name to (source name, dest content) | 33 # Map revnum to mappings of dest name to (source name, dest content) |
44 copies = { | 34 copies = { |
45 4: { | 35 4: { |
46 'a1': ('a', 'a\n'), | 36 'a1': ('a', 'a\n'), |
47 'a2': ('a', 'a\n'), | 37 'a2': ('a', 'a\n'), |
48 'b1': ('b', 'b\nc\n'), | 38 'b1': ('b', 'b\nc\n'), |
49 'da1/daf': ('da/daf', 'c\n'), | 39 'da1/daf': ('da/daf', 'c\n'), |
50 'da1/db/dbf': ('da/db/dbf', 'd\n'), | 40 'da1/db/dbf': ('da/db/dbf', 'd\n'), |
51 'da2/daf': ('da/daf', 'c\n'), | 41 'da2/daf': ('da/daf', 'c\n'), |