summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/builtin_hash.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/basics/builtin_hash.py')
-rw-r--r--tests/basics/builtin_hash.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/basics/builtin_hash.py b/tests/basics/builtin_hash.py
index 0abfe980e1..d7615c3ec0 100644
--- a/tests/basics/builtin_hash.py
+++ b/tests/basics/builtin_hash.py
@@ -19,3 +19,16 @@ class A:
print(hash(A()))
print({A():1})
+
+class B:
+ pass
+hash(B())
+
+
+class C:
+ def __eq__(self, another):
+ return True
+try:
+ hash(C())
+except TypeError:
+ print("TypeError")