From 3957a5aef28aaf6de5be9a6819737eab2090dfdd Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Tue, 23 Apr 2019 08:01:45 -0700 Subject: [PATCH] Sort for ALL and patterns SE-2388 --- pypeflow/do_task.py | 2 +- test/test_do_task.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pypeflow/do_task.py b/pypeflow/do_task.py index 03235d9..ea210f0 100644 --- a/pypeflow/do_task.py +++ b/pypeflow/do_task.py @@ -142,7 +142,7 @@ def __getattr__(self, name): result = self.kwds.itervalues() else: result = [str(self.kwds[name])] - return ' '.join(self.quote(v) for v in result) + return ' '.join(self.quote(v) for v in sorted(result)) def __init__(self, kwds, quote=quote): self.kwds = kwds self.quote = quote diff --git a/test/test_do_task.py b/test/test_do_task.py index 80a833d..e082bf7 100644 --- a/test/test_do_task.py +++ b/test/test_do_task.py @@ -35,7 +35,7 @@ echo PP """), # input.i* (with quoting) - ({'ii': 'II', 'ij': 'I J', 'ab': 'AB'}, {'oo': 'OO'}, {'pp': 'PP'}, + ({'ii': 'II', 'ij': 'I J', 'ia': 'IA', 'ab': 'AB'}, {'oo': 'OO'}, {'pp': 'PP'}, """\ echo {input.i*} echo {input.ab} @@ -43,7 +43,7 @@ echo {params.pp} """, """\ -echo II 'I J' +echo 'I J' IA II echo AB echo OO echo PP