From 469d3f8745bee9240d339c5ab0755b5a28b187a8 Mon Sep 17 00:00:00 2001 From: Douglas Raillard Date: Tue, 30 Nov 2021 12:39:23 +0000 Subject: [PATCH] lisa.utils: Fix SimpleHash.__eq__ FIX Fix SimpleHash equality check. dict.values() cannot be compared for equality in a useful manner. --- lisa/utils.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/lisa/utils.py b/lisa/utils.py index 7e0237059..01c6cd660 100644 --- a/lisa/utils.py +++ b/lisa/utils.py @@ -3065,13 +3065,7 @@ class SimpleHash: if self is other: return True elif self.__class__ is other.__class__: - d1 = self.__dict__ - d2 = other.__dict__ - # This improves the performance on average - if d1.values() != d2.values(): - return False - else: - return d1 == d2 + return self.__dict__ == other.__dict__ else: return False -- GitLab