summaryrefslogtreecommitdiff
path: root/tools/patman/func_test.py
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2019-05-14 15:53:51 -0600
committerSimon Glass <sjg@chromium.org>2019-07-10 16:52:58 -0600
commitb644c66f693c82750077b6f7530dde79f2ad7523 (patch)
treed061c65cc7ba8f4a3c764c05052529dc21fe2be1 /tools/patman/func_test.py
parent513eace47d63161cabfd3cce82f3e075525b164a (diff)
patman: Sort series output for repeatabily
We use sets to produce the list of To and Cc lines for a series. This does not result in stable ordering of the recipients. Sort each list to ensure that the output is repeatable. This is necessary for tests. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'tools/patman/func_test.py')
-rw-r--r--tools/patman/func_test.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 2c4392dbc1..f7d5ad68f6 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -183,10 +183,10 @@ class TestFunctional(unittest.TestCase):
self.assertEqual('Prefix:\t RFC', lines[line + 3])
self.assertEqual('Cover: 4 lines', lines[line + 4])
line += 5
- self.assertEqual(' Cc: %s' % mel.encode('utf-8'), lines[line + 0])
- self.assertEqual(' Cc: %s' % rick, lines[line + 1])
- self.assertEqual(' Cc: %s' % fred, lines[line + 2])
- self.assertEqual(' Cc: %s' % ed.encode('utf-8'), lines[line + 3])
+ self.assertEqual(' Cc: %s' % fred, lines[line + 0])
+ self.assertEqual(' Cc: %s' % ed.encode('utf-8'), lines[line + 1])
+ self.assertEqual(' Cc: %s' % mel.encode('utf-8'), lines[line + 2])
+ self.assertEqual(' Cc: %s' % rick, lines[line + 3])
expected = ('Git command: git send-email --annotate '
'--in-reply-to="%s" --to "u-boot@lists.denx.de" '
'--cc "%s" --cc-cmd "%s --cc-cmd %s" %s %s'
@@ -197,8 +197,8 @@ class TestFunctional(unittest.TestCase):
self.assertEqual(('%s %s, %s' % (args[0], rick, stefan))
.encode('utf-8'), cc_lines[0])
- self.assertEqual(('%s %s, %s, %s, %s' % (args[1], fred, rick, stefan,
- ed)).encode('utf-8'), cc_lines[1])
+ self.assertEqual(('%s %s, %s, %s, %s' % (args[1], fred, ed, rick,
+ stefan)).encode('utf-8'), cc_lines[1])
expected = '''
This is a test of how the cover