changeset 1483:4379baf58f9e stable

test_fetch_renames: refactoring to make debugging easier
author Augie Fackler <raf@durin42.com>
date Sun, 26 Jun 2016 20:25:52 -0400
parents 253b2ab253a1
children 9f1fa3cc6ba5
files tests/test_fetch_renames.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test_fetch_renames.py
+++ b/tests/test_fetch_renames.py
@@ -75,12 +75,15 @@ class TestFetchRenames(test_util.TestBas
             copymap = copies.get(rev, {})
             for f in ctx.manifest():
                 cp = ctx[f].renamed()
-                self.assertEqual(bool(cp), bool(copymap.get(f)),
-                                 'copy records differ for %s in %d' % (f, rev))
+                want = copymap.get(f)
+                self.assertEqual(
+                    bool(cp), bool(want),
+                    'copy records differ for %s in %d (want %r, got %r)' % (
+                        f, rev, want, cp))
                 if not cp:
                     continue
-                self.assertEqual(cp[0], copymap[f][0])
-                self.assertEqual(ctx[f].data(), copymap[f][1])
+                self.assertEqual(cp[0], want[0])
+                self.assertEqual(ctx[f].data(), want[1])
 
         self.assertEqual(repo['tip']['changed3'].data(), 'changed\nchanged3\n')