diff tests/test_fetch_branches.py @ 1048:903c9c9dfe6a

tests: count revisions explicitly The assumption that len(repo) corresponds to the count of actual, usable revision in the repository fails in presence of hidden revisions. Instead, we use a dedicated method in test_util, and change all tests to use this for obtaining repository length -- just to be safe...
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 09 Aug 2013 11:22:50 -0400
parents d741f536f23a
children b8142bbf6656
line wrap: on
line diff
--- a/tests/test_fetch_branches.py
+++ b/tests/test_fetch_branches.py
@@ -140,7 +140,7 @@ class TestFetchBranches(test_util.TestBa
     def test_replace_branch_with_branch(self, stupid=False):
         repo = self._load_fixture_and_fetch('replace_branch_with_branch.svndump',
                                             stupid=stupid)
-        self.assertEqual(7, len(repo))
+        self.assertEqual(7, test_util.repolen(repo))
         # tip is former topological branch1 being closed
         ctx = repo['tip']
         self.assertEqual('1', ctx.extra().get('close', '0'))