1
0
Fork 0
mirror of https://github.com/topydo/topydo.git synced 2024-06-03 02:48:34 +00:00

Make the input for the printer deterministic by sorting it

Otherwise it's hard to test the output when the order differs on every
execution.
This commit is contained in:
Bram Schoenmakers 2016-11-24 13:30:09 +01:00
parent b3d43d19a2
commit 36ce7ef1e8

View file

@ -142,6 +142,7 @@ class DepCommand(Command):
todos = set([self.todolist.todo(arg)])
todos |= set(self.todolist.children(todo))
todos |= set(self.todolist.parents(todo))
todos = sorted(todos, key=lambda t: t.text())
self.out(self.printer.print_list(todos))
except InvalidTodoException: