MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_buggy_builtin_repr

Function test_buggy_builtin_repr

testing/io/test_saferepr.py:130–138  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

128
129
130def test_buggy_builtin_repr():
131 # Simulate a case where a repr for a builtin raises.
132 # reprlib dispatches by type name, so use "int".
133
134 class int:
135 def __repr__(self):
136 raise ValueError("Buggy repr!")
137
138 assert "Buggy" in saferepr(int())
139
140
141def test_big_repr():

Callers

nothing calls this directly

Calls 2

safereprFunction · 0.90
intClass · 0.85

Tested by

no test coverage detected