comparison tests/test_rebuildmeta.py @ 204:496ff87e2532

test_rebuildmeta: Remove the "expected missing" hack now that the branch refactor fixed that problem.
author Augie Fackler <durin42@gmail.com>
date Tue, 03 Mar 2009 00:02:09 -0600
parents 125cf3cb7bee
children 2117cb0118fe
comparison
equal deleted inserted replaced
203:907c160c6289 204:496ff87e2532
6 from mercurial import ui 6 from mercurial import ui
7 7
8 import test_util 8 import test_util
9 import rebuildmeta 9 import rebuildmeta
10 import hg_delta_editor 10 import hg_delta_editor
11
12 # List of expected "missing" branches - these are really files that happen
13 # to be in the branches dir. This will be fixed at a later date.
14 expected_branch_deltas = {'unrelatedbranch.svndump': [ ],
15 'file_mixed_with_branches.svndump': [ ],
16 }
17 11
18 def _do_case(self, name, stupid): 12 def _do_case(self, name, stupid):
19 subdir = test_util.subdir.get(name, '') 13 subdir = test_util.subdir.get(name, '')
20 self._load_fixture_and_fetch(name, subdir=subdir, stupid=stupid) 14 self._load_fixture_and_fetch(name, subdir=subdir, stupid=stupid)
21 assert len(self.repo) > 0 15 assert len(self.repo) > 0
37 'tag_info'))), 31 'tag_info'))),
38 pickle.load(open(os.path.join(dest.path, 'svn', 32 pickle.load(open(os.path.join(dest.path, 'svn',
39 'tag_info')))) 33 'tag_info'))))
40 self.assertEqual(src.branchtags(), dest.branchtags()) 34 self.assertEqual(src.branchtags(), dest.branchtags())
41 srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info'))) 35 srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info')))
42 for mustpop in expected_branch_deltas.get(name, []):
43 del srcbi[mustpop]
44 destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info'))) 36 destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info')))
45 self.assertEqual(sorted(srcbi.keys()), sorted(destbi.keys())) 37 self.assertEqual(sorted(srcbi.keys()), sorted(destbi.keys()))
46 for branch in destbi: 38 for branch in destbi:
47 srcinfo = srcbi[branch] 39 srcinfo = srcbi[branch]
48 destinfo = destbi[branch] 40 destinfo = destbi[branch]