MCPcopy Index your code
hub / github.com/python/cpython / HaskKeyCrasher

Class HaskKeyCrasher

Lib/test/test_context.py:638–649  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636
637
638class HaskKeyCrasher:
639 def __init__(self, *, error_on_hash=False, error_on_eq=False):
640 self.error_on_hash = error_on_hash
641 self.error_on_eq = error_on_eq
642
643 def __enter__(self):
644 if HashKey._crasher is not None:
645 raise RuntimeError('cannot nest crashers')
646 HashKey._crasher = self
647
648 def __exit__(self, *exc):
649 HashKey._crasher = None
650
651
652class 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…