Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update __hash__ in test
  • Loading branch information
brijkapadia committed Mar 20, 2026
commit ef70ca53f41227a67e3a0a1e76196cf4272d0d0d
3 changes: 2 additions & 1 deletion Lib/test/test_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,8 @@ def test_code_richcompare_raise_exception(self):
class BadStr(str):
def __eq__(self, _):
raise RuntimeError("Poison!")
def __hash__(self): return str.__hash__(self)

__hash__ = str.__hash__

c1 = compile("pass", "test", "exec")
c2 = c1.replace(co_name=BadStr("poison"))
Expand Down
Loading