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

Class BadCompare

Lib/test/test_deque.py:107–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

105 self.assertRaises(TypeError, d.count) # too few args
106 self.assertRaises(TypeError, d.count, 1, 2) # too many args
107 class BadCompare:
108 def __eq__(self, other):
109 raise ArithmeticError
110 d = deque([1, 2, BadCompare(), 3])
111 self.assertRaises(ArithmeticError, d.count, 2)
112 d = deque([1, 2, 3])

Callers 1

test_countMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_countMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…