diff --git a/tests/test_container.py b/tests/test_container.py index bcdfc01..79d73ee 100644 --- a/tests/test_container.py +++ b/tests/test_container.py @@ -17,6 +17,8 @@ def test_list_item(): l_item2 = deserialize(container.ListItem(), b) assert l_item == l_item2 + l_item3 = container.ListItem() + assert l_item != l_item3 def test_map_item(): m_item = container.MapItem() diff --git a/thriftpy/thrift.py b/thriftpy/thrift.py index 126340e..3422d7b 100644 --- a/thriftpy/thrift.py +++ b/thriftpy/thrift.py @@ -107,7 +107,7 @@ def __hash__(self): return super(TPayload, self).__hash__() def __ne__(self, other): - return self != other + return not self.__eq__(other) class TClient(object):