test.ListCmd: Make row comparison faster (TODO: Not active)

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2022-12-19 15:19:47 +01:00
commit 22de74795b

View file

@ -74,6 +74,14 @@ class ListCmd(TestCase): # export
decisive = self.parent.decisive decisive = self.parent.decisive
for field in decisive: for field in decisive:
s, o = self.field(field, throw=False), other.field(field, throw=False) 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 and not o) or (o and not s):
if s: # certainly not o if s: # certainly not o
return 1 return 1