summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Beecher <ben@lightmatter.com>2019-08-29 15:52:02 -0400
committerJelmer Vernooij <jelmer@jelmer.uk>2022-07-01 19:35:02 +0100
commitcf6b8b0ec9e8a16fa64bddbe0ae69f0f235a550a (patch)
tree1f221438578b22a40934248ebc7e99e0430a4ced
parent56537559a34c4bc1e5f11e68e6378a26c241b474 (diff)
downloadtesttools-cf6b8b0ec9e8a16fa64bddbe0ae69f0f235a550a.tar.gz
less code
-rw-r--r--testtools/testcase.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/testtools/testcase.py b/testtools/testcase.py
index 2c88545..ea5a8d7 100644
--- a/testtools/testcase.py
+++ b/testtools/testcase.py
@@ -276,11 +276,8 @@ class TestCase(unittest.TestCase):
return self.__dict__ == other.__dict__
def __hash__(self):
- hashfn = getattr(unittest.TestCase, '__hash__', None)
- if hashfn is not None:
- return hashfn(self)
- return id(self)
-
+ hashfn = getattr(unittest.TestCase, '__hash__', id)
+ return hashfn(self)
def __repr__(self):
# We add id to the repr because it makes testing testtools easier.