Module: check_mk
Branch: master
Commit: 97db169d88d728630be2058a0eec22985510e80f
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=97db169d88d728…
Author: Konstantin Büttner <kb(a)mathias-kettner.de>
Date: Fri Jan 19 12:35:49 2018 +0100
checktestlib.PerfValue: Minor cleanup
Change-Id: I67b384a874b87e899b58b88dd92bc09d9611cdba
---
tests/checks/checktestlib.py | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/tests/checks/checktestlib.py b/tests/checks/checktestlib.py
index e0288f9..6115725 100644
--- a/tests/checks/checktestlib.py
+++ b/tests/checks/checktestlib.py
@@ -29,14 +29,7 @@ class PerfValue(object):
def __eq__(self, other_value):
if isinstance(other_value, self.__class__):
- return all([
- self.key == other_value.key,
- self.value == other_value.value,
- self.warn == other_value.warn,
- self.crit == other_value.crit,
- self.minimum == other_value.minimum,
- self.maximum == other_value.maximum,
- ])
+ return all(x==y for x, y in zip(other_value.tuple, self.tuple))
elif type(other_value) == tuple:
return all(x==y for x, y in zip(other_value, self.tuple))