Mercurial > hgsubversion
comparison tests/test_utility_commands.py @ 866:20e73b5ab6f7
test_util: merge load_svndump_fixture() into TestBase
author | Patrick Mezard <patrick@mezard.eu> |
---|---|
date | Thu, 19 Apr 2012 18:29:28 +0200 |
parents | 04729f3a3d17 |
children | 50c13e01c7e3 |
comparison
equal
deleted
inserted
replaced
865:04729f3a3d17 | 866:20e73b5ab6f7 |
---|---|
226 svncommands.genignore(u, self.repo, self.wc_path) | 226 svncommands.genignore(u, self.repo, self.wc_path) |
227 self.assertMultiLineEqual(open(os.path.join(self.wc_path, '.hgignore')).read(), | 227 self.assertMultiLineEqual(open(os.path.join(self.wc_path, '.hgignore')).read(), |
228 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n') | 228 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n') |
229 | 229 |
230 def test_list_authors(self): | 230 def test_list_authors(self): |
231 test_util.load_svndump_fixture(self.repo_path, | 231 repo_path = self.load_svndump('replace_trunk_with_branch.svndump') |
232 'replace_trunk_with_branch.svndump') | |
233 u = self.ui() | 232 u = self.ui() |
234 u.pushbuffer() | 233 u.pushbuffer() |
235 svncommands.listauthors(u, | 234 svncommands.listauthors(u, |
236 args=[test_util.fileurl(self.repo_path)], | 235 args=[test_util.fileurl(repo_path)], |
237 authors=None) | 236 authors=None) |
238 actual = u.popbuffer() | 237 actual = u.popbuffer() |
239 self.assertMultiLineEqual(actual, 'Augie\nevil\n') | 238 self.assertMultiLineEqual(actual, 'Augie\nevil\n') |
240 | 239 |
241 | |
242 def test_list_authors_map(self): | 240 def test_list_authors_map(self): |
243 test_util.load_svndump_fixture(self.repo_path, | 241 repo_path = self.load_svndump('replace_trunk_with_branch.svndump') |
244 'replace_trunk_with_branch.svndump') | 242 author_path = os.path.join(repo_path, 'authors') |
245 author_path = os.path.join(self.repo_path, 'authors') | |
246 svncommands.listauthors(self.ui(), | 243 svncommands.listauthors(self.ui(), |
247 args=[test_util.fileurl(self.repo_path)], | 244 args=[test_util.fileurl(repo_path)], |
248 authors=author_path) | 245 authors=author_path) |
249 self.assertMultiLineEqual(open(author_path).read(), 'Augie=\nevil=\n') | 246 self.assertMultiLineEqual(open(author_path).read(), 'Augie=\nevil=\n') |
250 | 247 |
251 | 248 |
252 def suite(): | 249 def suite(): |
253 all_tests = [unittest.TestLoader().loadTestsFromTestCase(UtilityTests), | 250 all_tests = [unittest.TestLoader().loadTestsFromTestCase(UtilityTests), |