comparison tests/test_tags.py @ 865:04729f3a3d17

test_util: merge load_fixture_and_fetch() into TestBase method The middle-term goal is to make TestBase repo_path and wc_path private, so they can be changed for every load call. This is not required to use nosetests multiprocess facility as the fixtures create temporary directories but it makes things much clearer and avoid weird cases where a repository was loaded several times at the same location in a single test (cf test_startrev). That way we will be more confident the tests can be parallelized. The long term goal is to make hgsubversion compatible with nosetests --processes option.
author Patrick Mezard <patrick@mezard.eu>
date Thu, 19 Apr 2012 18:29:25 +0200
parents e9af7eba88db
children 50c13e01c7e3
comparison
equal deleted inserted replaced
864:39d45f2190ee 865:04729f3a3d17
10 10
11 from hgsubversion import svncommands 11 from hgsubversion import svncommands
12 from hgsubversion import svnrepo 12 from hgsubversion import svnrepo
13 13
14 class TestTags(test_util.TestBase): 14 class TestTags(test_util.TestBase):
15 def _load_fixture_and_fetch(self, fixture_name, stupid=False):
16 return test_util.load_fixture_and_fetch(fixture_name, self.repo_path,
17 self.wc_path, stupid=stupid)
18
19 def test_tags(self, stupid=False): 15 def test_tags(self, stupid=False):
20 repo = self._load_fixture_and_fetch('basic_tag_tests.svndump', 16 repo = self._load_fixture_and_fetch('basic_tag_tests.svndump',
21 stupid=stupid) 17 stupid=stupid)
22 self.assertEqual(sorted(repo.tags()), ['copied_tag', 'tag_r3', 'tip']) 18 self.assertEqual(sorted(repo.tags()), ['copied_tag', 'tag_r3', 'tip'])
23 self.assertEqual(repo['tag_r3'], repo['copied_tag']) 19 self.assertEqual(repo['tag_r3'], repo['copied_tag'])