[Piglit] [PATCH 26/44] framework/status.py: Add __hash__ method to NoChangeStatus

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Wed Jan 27 16:06:34 PST 2016


From: Dylan Baker <baker.dylan.c at gmail.com>

Apparently these aren't inherited in python 3, which makes sense.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 framework/status.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/framework/status.py b/framework/status.py
index 4c8b421..7fca856 100644
--- a/framework/status.py
+++ b/framework/status.py
@@ -227,6 +227,9 @@ class NoChangeStatus(Status):
             return six.text_type(self) != six.text_type(other)
         raise TypeError("Cannot compare type: {}".format(type(other)))
 
+    def __hash__(self):
+        return hash(self.name)
+
 
 NOTRUN = NoChangeStatus('notrun')
 
-- 
2.7.0



More information about the Piglit mailing list