diff tests/comprehensive/test_stupid_pull.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 cd256960b622
line wrap: on
line diff
--- a/tests/comprehensive/test_stupid_pull.py
+++ b/tests/comprehensive/test_stupid_pull.py
@@ -21,7 +21,8 @@ def _do_case(self, name, layout):
     subdir = test_util.subdir.get(name, '')
     repo, repo_path = self.load_and_fetch(name, subdir=subdir, stupid=False,
                                           layout=layout)
-    assert len(self.repo) > 0, 'Repo had no changes, maybe you need to add a subdir entry in test_util?'
+    assert test_util.repolen(self.repo) > 0, \
+        'Repo had no changes, maybe you need to add a subdir entry in test_util?'
     wc2_path = self.wc_path + '_stupid'
     u = ui.ui()
     checkout_path = repo_path