# HG changeset patch # User Sean Farley # Date 1393115032 21600 # Node ID d62c53c7a37d72735b857b0135ce4f4d9cbc9623 # Parent 770ac6de58c5aacabb267624d1cac69c70a8610c tests: relax testing for tagmap existence In an upcoming patch, we will turn meta.tags into a lazy property so we only check the tags file when both exist. diff --git a/tests/comprehensive/test_rebuildmeta.py b/tests/comprehensive/test_rebuildmeta.py --- a/tests/comprehensive/test_rebuildmeta.py +++ b/tests/comprehensive/test_rebuildmeta.py @@ -110,10 +110,16 @@ def _run_assertions(self, name, single, for tf in ('lastpulled', 'rev_map', 'uuid', 'tagmap', 'layout', 'subdir',): stf = os.path.join(src.path, 'svn', tf) - self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf) + # the generation of tagmap is lazy so it doesn't strictly need to exist + # if it's not being used + if not stf.endswith('tagmap'): + self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf) dtf = os.path.join(dest.path, 'svn', tf) - self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf) - old, new = util.load(stf, resave=False), util.load(dtf, resave=False) + old, new = None, None + if not dtf.endswith('tagmap'): + self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf) + if os.path.isfile(stf) and os.path.isfile(dtf): + old, new = util.load(stf, resave=False), util.load(dtf, resave=False) if tf == 'lastpulled' and (name, self.stupid, single) in expect_youngest_skew: self.assertNotEqual(old, new,