From 22de74795b4da55fb88c39a44b1addf16f2a4f2b Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Mon, 19 Dec 2022 15:19:47 +0100 Subject: [PATCH] test.ListCmd: Make row comparison faster (TODO: Not active) Signed-off-by: Jan Lindemann --- src/python/devtest/os/test/ListCmd.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/python/devtest/os/test/ListCmd.py b/src/python/devtest/os/test/ListCmd.py index 7fdde9a..a7a674e 100644 --- a/src/python/devtest/os/test/ListCmd.py +++ b/src/python/devtest/os/test/ListCmd.py @@ -74,6 +74,14 @@ class ListCmd(TestCase): # export decisive = self.parent.decisive for field in decisive: s, o = self.field(field, throw=False), other.field(field, throw=False) + # if s: + # if not o: + # return 1 + # # s and o both not None, checks below are meaningful + # else: + # if not o: + # continue # both are equal and None + # return -1 # s is None, o isn't if (s and not o) or (o and not s): if s: # certainly not o return 1