From 9c48984bb4bb014bcae76ed46701bfa2285c240d Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Mon, 15 Apr 2013 19:04:14 -0500 Subject: [PATCH] timeside/analyzer/core.py: add __eq__ to AnalyzerResultContainer --- timeside/analyzer/core.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/timeside/analyzer/core.py b/timeside/analyzer/core.py index 99ac45a..4e1a29c 100644 --- a/timeside/analyzer/core.py +++ b/timeside/analyzer/core.py @@ -91,6 +91,13 @@ class AnalyzerResultContainer(object): def __repr__(self): return self.to_json() + def __eq__(self, that): + if hasattr(that, 'results'): + that = that.results + for a, b in zip(self.results, that): + if a != b: return False + return True + def add_result(self, analyzer_result): if type(analyzer_result) == list: for a in analyzer_result: -- 2.39.5