comparison 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
comparison
equal deleted inserted replaced
1047:3092b3c109a8 1048:903c9c9dfe6a
19 19
20 def _do_case(self, name, layout): 20 def _do_case(self, name, layout):
21 subdir = test_util.subdir.get(name, '') 21 subdir = test_util.subdir.get(name, '')
22 repo, repo_path = self.load_and_fetch(name, subdir=subdir, stupid=False, 22 repo, repo_path = self.load_and_fetch(name, subdir=subdir, stupid=False,
23 layout=layout) 23 layout=layout)
24 assert len(self.repo) > 0, 'Repo had no changes, maybe you need to add a subdir entry in test_util?' 24 assert test_util.repolen(self.repo) > 0, \
25 'Repo had no changes, maybe you need to add a subdir entry in test_util?'
25 wc2_path = self.wc_path + '_stupid' 26 wc2_path = self.wc_path + '_stupid'
26 u = ui.ui() 27 u = ui.ui()
27 checkout_path = repo_path 28 checkout_path = repo_path
28 if subdir: 29 if subdir:
29 checkout_path += '/' + subdir 30 checkout_path += '/' + subdir