Mercurial > hgsubversion
changeset 1482:253b2ab253a1 stable
tests: add some sorted() calls on unsorted sets
These are all just defects in the tests exposed by running the tests
under a random hash seed.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Sun, 26 Jun 2016 17:02:12 -0400 |
parents | 1bb2df7523a3 |
children | 4379baf58f9e |
files | tests/test_fetch_branches.py tests/test_fetch_mappings.py tests/test_tags.py |
diffstat | 3 files changed, 6 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test_fetch_branches.py +++ b/tests/test_fetch_branches.py @@ -41,7 +41,8 @@ class TestFetchBranches(test_util.TestBa heads = dict([(ctx.branch(), ctx) for ctx in heads]) # Let these tests disabled yet as the fix is not obvious self.assertEqual(heads['branch1'].manifest().keys(), ['b']) - self.assertEqual(heads['branch2'].manifest().keys(), ['a', 'b']) + self.assertEqual(sorted(heads['branch2'].manifest().keys()), + ['a', 'b']) def test_unorderedbranch(self): repo = self._load_fixture_and_fetch('unorderedbranch.svndump')
--- a/tests/test_fetch_mappings.py +++ b/tests/test_fetch_mappings.py @@ -149,9 +149,9 @@ class MapTests(test_util.TestBase): # The exclusion of alpha is overridden by the later rule to # include all of '.', whereas gamma should remain excluded # because it's excluded after the root directory. - self.assertEqual(self.repo[0].manifest().keys(), + self.assertEqual(sorted(self.repo[0].manifest().keys()), ['alpha', 'beta']) - self.assertEqual(self.repo['default'].manifest().keys(), + self.assertEqual(sorted(self.repo['default'].manifest().keys()), ['alpha', 'beta']) @test_util.requiresreplay
--- a/tests/test_tags.py +++ b/tests/test_tags.py @@ -128,10 +128,8 @@ rename a tag 'branch': 'magic', 'convert_revision': 'svn:af82cc90-c2d2-43cd-b1aa-c8a78449440a/tags/will-edit@19'}) self.assertEqual(willedit, repo.tags()['will-edit']) - self.assertEqual(repo['will-edit'].manifest().keys(), ['alpha', - 'beta', - 'gamma', - ]) + self.assertEqual(sorted(repo['will-edit'].manifest().keys()), + ['alpha', 'beta', 'gamma']) self.assertEqual( repo[alsoedit].extra(), {'close': '1',