comparison tests/test_rebuildmeta.py @ 347:537de0300510

Remove the 'outgoing' wrapper, and use the Mercurial infrastructure instead.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 22 May 2009 15:12:31 +0200
parents 46e69be8e2c8
children 987bd7444f60
comparison
equal deleted inserted replaced
346:4b992ebdecc6 347:537de0300510
1 import os 1 import os
2 import pickle 2 import pickle
3 import unittest 3 import unittest
4
5 import test_util
4 6
5 from mercurial import hg 7 from mercurial import hg
6 from mercurial import ui 8 from mercurial import ui
7 9
8 from hgsubversion import svncommands 10 from hgsubversion import svncommands
9 from hgsubversion import hg_delta_editor 11 from hgsubversion import hg_delta_editor
10
11 import test_util
12 12
13 def _do_case(self, name, stupid): 13 def _do_case(self, name, stupid):
14 subdir = test_util.subdir.get(name, '') 14 subdir = test_util.subdir.get(name, '')
15 self._load_fixture_and_fetch(name, subdir=subdir, stupid=stupid) 15 self._load_fixture_and_fetch(name, subdir=subdir, stupid=stupid)
16 assert len(self.repo) > 0 16 assert len(self.repo) > 0
67 67
68 68
69 attrs = {'_do_case': _do_case, 69 attrs = {'_do_case': _do_case,
70 } 70 }
71 for case in [f for f in os.listdir(test_util.FIXTURES) if f.endswith('.svndump')]: 71 for case in [f for f in os.listdir(test_util.FIXTURES) if f.endswith('.svndump')]:
72 # this fixture results in an empty repository, don't use it
73 if case == 'project_root_not_repo_root.svndump':
74 continue
72 name = 'test_' + case[:-len('.svndump')] 75 name = 'test_' + case[:-len('.svndump')]
73 attrs[name] = buildmethod(case, name, False) 76 attrs[name] = buildmethod(case, name, False)
74 name += '_stupid' 77 name += '_stupid'
75 attrs[name] = buildmethod(case, name, True) 78 attrs[name] = buildmethod(case, name, True)
76 RebuildMetaTests = type('RebuildMetaTests', (test_util.TestBase, ), attrs) 79 RebuildMetaTests = type('RebuildMetaTests', (test_util.TestBase, ), attrs)