MCPcopy Index your code
hub / github.com/pytest-dev/pytest / Evil

Class Evil

testing/test_compat.py:21–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19
20def test_real_func_loop_limit() -> None:
21 class Evil:
22 def __init__(self):
23 self.left = 1000
24
25 def __repr__(self):
26 return f"<Evil left={self.left}>"
27
28 def __getattr__(self, attr):
29 if not self.left:
30 raise RuntimeError("it's over") # pragma: no cover
31 self.left -= 1
32 return self
33
34 evil = Evil()
35

Callers 1

Calls

no outgoing calls

Tested by 1

Used in the wild real call sites across dependent graphs

searching dependent graphs…