summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Beecher <Ben@lightmatter.com>2022-04-30 20:05:24 -0400
committerJelmer Vernooij <jelmer@jelmer.uk>2022-07-01 19:35:02 +0100
commite223b5dfada74e8a7438f699c81ab2baeb08df60 (patch)
tree6ddaccbb766e2c516aae67d9fdc0a9fba1243c8c
parentcf6b8b0ec9e8a16fa64bddbe0ae69f0f235a550a (diff)
downloadtesttools-e223b5dfada74e8a7438f699c81ab2baeb08df60.tar.gz
simplifying code
-rw-r--r--testtools/testcase.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/testtools/testcase.py b/testtools/testcase.py
index ea5a8d7..f3bd510 100644
--- a/testtools/testcase.py
+++ b/testtools/testcase.py
@@ -275,9 +275,7 @@ class TestCase(unittest.TestCase):
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.