# HG changeset patch # User Augie Fackler # Date 1466974932 14400 # Node ID 253b2ab253a1726106be9fe6ac126a850d506bcd # Parent 1bb2df7523a3302b5c542741ff27eebf9a4d626d 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. diff --git a/tests/test_fetch_branches.py b/tests/test_fetch_branches.py --- 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') diff --git a/tests/test_fetch_mappings.py b/tests/test_fetch_mappings.py --- 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 diff --git a/tests/test_tags.py b/tests/test_tags.py --- 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',