Skip to content

Commit 28b8313

Browse files
committed
fix: fix the test
1 parent 57ae1f0 commit 28b8313

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Lib/test/test_frame.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,18 @@ def get_frame():
187187

188188
frame = get_frame()
189189

190-
class Fuse(str):
190+
class Fuse:
191191
cleared = False
192-
__hash__ = str.__hash__
192+
def __init__(self, s):
193+
self.s = s
194+
def __hash__(self):
195+
return hash(self.s)
193196
def __eq__(self, other):
194197
if not Fuse.cleared and other == "boom":
195198
Fuse.cleared = True
196199
Fuse.frame.clear()
197200
return False
198-
return super().__eq__(other)
201+
return True
199202

200203
Fuse.frame = frame
201204
frame.f_locals[Fuse("boom")] = 0

0 commit comments

Comments
 (0)