comparison tests/test_rebuildmeta.py @ 655:dcac6dc1abe6

test_rebuildmeta: make an assertion more helpful.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 06 Aug 2010 14:43:40 +0200
parents d2ef7220a079
children e1e2af66953d
comparison
equal deleted inserted replaced
654:e4f9603ab82a 655:dcac6dc1abe6
58 revkeys = svnmeta.SVNMeta(dest).revmap.keys() 58 revkeys = svnmeta.SVNMeta(dest).revmap.keys()
59 for branch in destbi: 59 for branch in destbi:
60 srcinfo = srcbi[branch] 60 srcinfo = srcbi[branch]
61 destinfo = destbi[branch] 61 destinfo = destbi[branch]
62 if srcinfo[:2] == (None, 0) or destinfo[:2] == (None, 0): 62 if srcinfo[:2] == (None, 0) or destinfo[:2] == (None, 0):
63 self.assert_(srcinfo[2] <= destinfo[2]) 63 self.assertTrue(srcinfo[2] <= destinfo[2],
64 'Latest revision for %s decreased from %d to %d!'
65 % (branch or 'default', srcinfo[2], destinfo[2]))
64 self.assertEqual(srcinfo[0], destinfo[0]) 66 self.assertEqual(srcinfo[0], destinfo[0])
65 else: 67 else:
66 pr = sorted(filter(lambda x: x[1] == srcinfo[0] and x[0] <= srcinfo[1], 68 pr = sorted(filter(lambda x: x[1] == srcinfo[0] and x[0] <= srcinfo[1],
67 revkeys), reverse=True)[0][0] 69 revkeys), reverse=True)[0][0]
68 self.assertEqual(pr, destinfo[1]) 70 self.assertEqual(pr, destinfo[1])