Skip to content

Commit

Permalink
simplifying code
Browse files Browse the repository at this point in the history
  • Loading branch information
gone authored and jelmer committed Jul 1, 2022
1 parent cf6b8b0 commit e223b5d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions testtools/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,7 @@ def __eq__(self, other):
return False
return self.__dict__ == other.__dict__

def __hash__(self):
hashfn = getattr(unittest.TestCase, '__hash__', id)
return hashfn(self)
__hash__ = unittest.TestCase.__hash__

def __repr__(self):
# We add id to the repr because it makes testing testtools easier.
Expand Down

0 comments on commit e223b5d

Please sign in to comment.