Skip to content

Commit ef70ca5

Browse files
committed
Update __hash__ in test
1 parent 7f1d736 commit ef70ca5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_code.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,8 @@ def test_code_richcompare_raise_exception(self):
11681168
class BadStr(str):
11691169
def __eq__(self, _):
11701170
raise RuntimeError("Poison!")
1171-
def __hash__(self): return str.__hash__(self)
1171+
1172+
__hash__ = str.__hash__
11721173

11731174
c1 = compile("pass", "test", "exec")
11741175
c2 = c1.replace(co_name=BadStr("poison"))

0 commit comments

Comments
 (0)