# HG changeset patch # User Julien Cristau # Date 1445270914 -7200 # Node ID 107b87bbbaa7537aba6f7439f964e0e8d88cdac1 # Parent fef0ab4c4f94c77d6e57575d4027ce039b2edcfd [devtools] more sorted() vs dict vs python3 diff -r fef0ab4c4f94 -r 107b87bbbaa7 devtools/repotest.py --- a/devtools/repotest.py Tue Nov 03 12:25:14 2015 +0100 +++ b/devtools/repotest.py Mon Oct 19 18:08:34 2015 +0200 @@ -57,7 +57,7 @@ 'expected %s queries, got %s' % (len(equeries), len(queries))) for i, (rql, sol) in enumerate(queries): self.assertEqual(rql, equeries[i][0]) - self.assertEqual(sorted(sol), sorted(equeries[i][1])) + self.assertEqual(sorted(sorted(x.items()) for x in sol), sorted(sorted(x.items()) for x in equeries[i][1])) idx = 2 else: idx = 1 @@ -317,7 +317,7 @@ def _check_permissions(*args, **kwargs): res, restricted = _orig_check_permissions(*args, **kwargs) - res = DumbOrderedDict(sorted(res.items(), key=lambda x: x[1])) + res = DumbOrderedDict(sorted(res.items(), key=lambda x: [y.items() for y in x[1]])) return res, restricted def _dummy_check_permissions(self, rqlst):