comparison tests/test_svnwrap.py @ 666:192a3f65837a

svnwrap: remove dead code Some member functions of SubversionRepo were unused, and removing them frees other wrappers from adding possibly incorrect implementations of them. Two methods, `tags_at_rev' and `_get_copy_source' were completely unused and could easily be removed. Another two methods, `branches' and `tags' had explicit tests for them but weren't used in the code proper; they were removed too. The START property was unnecessary and could be removed with a tiny refactoring. No functionality change.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Wed, 11 Aug 2010 19:57:35 +0200
parents d2ef7220a079
children e9af7eba88db
comparison
equal deleted inserted replaced
665:b5a231695329 666:192a3f65837a
51 if p: 51 if p:
52 assert p[0] != '/' 52 assert p[0] != '/'
53 revs = list(self.repo.revisions(start=3)) 53 revs = list(self.repo.revisions(start=3))
54 self.assertEqual(len(revs), 4) 54 self.assertEqual(len(revs), 4)
55 55
56
57 def test_branches(self):
58 self.assertEqual(self.repo.branches.keys(), ['crazy', 'more_crazy'])
59 self.assertEqual(self.repo.branches['crazy'], ('trunk', 2, 4))
60 self.assertEqual(self.repo.branches['more_crazy'], ('trunk', 5, 7))
61
62
63 def test_tags(self):
64 tags = self.repo.tags
65 self.assertEqual(tags.keys(), ['rev1'])
66 self.assertEqual(tags['rev1'], ('trunk', 2))
67
68 class TestRootAsSubdirOfRepo(TestBasicRepoLayout): 56 class TestRootAsSubdirOfRepo(TestBasicRepoLayout):
69 def setUp(self): 57 def setUp(self):
70 self.tmpdir = tempfile.mkdtemp('svnwrap_test') 58 self.tmpdir = tempfile.mkdtemp('svnwrap_test')
71 self.repo_path = '%s/testrepo' % self.tmpdir 59 self.repo_path = '%s/testrepo' % self.tmpdir
72 subprocess.call(['svnadmin', 'create', self.repo_path,]) 60 subprocess.call(['svnadmin', 'create', self.repo_path,])