comparison tests/test_fetch_branches.py @ 1321:a36e87ae2380

tests: always compare manifest keys in sorted order Not comparing sorted lists was probably always a mistake, but it became an actual failure when upstream Mercurial changed to using lazymanifest, which always returns keys in sorted order.
author Siddharth Agarwal <sid0@fb.com>
date Fri, 27 Mar 2015 16:44:05 -0700
parents ba8485b9fee0
children 253b2ab253a1
comparison
equal deleted inserted replaced
1320:2061fd988f3f 1321:a36e87ae2380
80 self.assertEqual(repo['test']['dir/file'].data(), 'trunk2\n') 80 self.assertEqual(repo['test']['dir/file'].data(), 'trunk2\n')
81 81
82 82
83 def test_branch_create_with_dir_delete_works(self): 83 def test_branch_create_with_dir_delete_works(self):
84 repo = self._load_fixture_and_fetch('branch_create_with_dir_delete.svndump') 84 repo = self._load_fixture_and_fetch('branch_create_with_dir_delete.svndump')
85 self.assertEqual(repo['tip'].manifest().keys(), 85 self.assertEqual(sorted(repo['tip'].manifest().keys()),
86 ['alpha', 'beta', 'iota', 'gamma', ]) 86 ['alpha', 'beta', 'gamma', 'iota', ])
87 87
88 def test_branch_tip_update_to_default(self): 88 def test_branch_tip_update_to_default(self):
89 repo = self._load_fixture_and_fetch('unorderedbranch.svndump', 89 repo = self._load_fixture_and_fetch('unorderedbranch.svndump',
90 noupdate=False) 90 noupdate=False)
91 self.assertEqual(repo[None].branch(), 'default') 91 self.assertEqual(repo[None].branch(), 'default')