Mercurial > hgsubversion
comparison tests/comprehensive/test_rebuildmeta.py @ 1149:34173bbd3b8e
tests: use util.load instead of reading file directly
| author | Sean Farley <sean.michael.farley@gmail.com> |
|---|---|
| date | Tue, 18 Feb 2014 17:17:02 -0600 |
| parents | ff4e102932ed |
| children | d62c53c7a37d |
comparison
equal
deleted
inserted
replaced
| 1148:91d685418490 | 1149:34173bbd3b8e |
|---|---|
| 111 | 111 |
| 112 stf = os.path.join(src.path, 'svn', tf) | 112 stf = os.path.join(src.path, 'svn', tf) |
| 113 self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf) | 113 self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf) |
| 114 dtf = os.path.join(dest.path, 'svn', tf) | 114 dtf = os.path.join(dest.path, 'svn', tf) |
| 115 self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf) | 115 self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf) |
| 116 old, new = open(stf).read(), open(dtf).read() | 116 old, new = util.load(stf, resave=False), util.load(dtf, resave=False) |
| 117 if tf == 'lastpulled' and (name, | 117 if tf == 'lastpulled' and (name, |
| 118 self.stupid, single) in expect_youngest_skew: | 118 self.stupid, single) in expect_youngest_skew: |
| 119 self.assertNotEqual(old, new, | 119 self.assertNotEqual(old, new, |
| 120 'rebuildmeta unexpected match on youngest rev!') | 120 'rebuildmeta unexpected match on youngest rev!') |
| 121 continue | 121 continue |
| 122 self.assertMultiLineEqual(old, new, tf + ' differs') | 122 self.assertEqual(old, new, tf + ' differs') |
| 123 try: | 123 try: |
| 124 self.assertEqual(src.branchmap(), dest.branchmap()) | 124 self.assertEqual(src.branchmap(), dest.branchmap()) |
| 125 except AttributeError: | 125 except AttributeError: |
| 126 # hg 2.8 and earlier | 126 # hg 2.8 and earlier |
| 127 self.assertEqual(src.branchtags(), dest.branchtags()) | 127 self.assertEqual(src.branchtags(), dest.branchtags()) |
