MCPcopy Index your code
hub / github.com/RustPython/RustPython / HaskKeyCrasher

Class HaskKeyCrasher

Lib/test/test_context.py:425–436  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423
424
425class HaskKeyCrasher:
426 def __init__(self, *, error_on_hash=False, error_on_eq=False):
427 self.error_on_hash = error_on_hash
428 self.error_on_eq = error_on_eq
429
430 def __enter__(self):
431 if HashKey._crasher is not None:
432 raise RuntimeError('cannot nest crashers')
433 HashKey._crasher = self
434
435 def __exit__(self, *exc):
436 HashKey._crasher = None
437
438
439class HashingError(Exception):

Callers 3

test_hamt_stressMethod · 0.85
test_hamt_in_1Method · 0.85
test_hamt_getitem_1Method · 0.85

Calls

no outgoing calls

Tested by 3

test_hamt_stressMethod · 0.68
test_hamt_in_1Method · 0.68
test_hamt_getitem_1Method · 0.68