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