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

Class A

testing/io/test_saferepr.py:27–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25
26def test_maxsize_error_on_instance():
27 class A:
28 def __repr__(self):
29 raise ValueError("...")
30
31 s = saferepr(("*" * 50, A()), maxsize=25)
32 assert len(s) == 25

Callers 1

Calls

no outgoing calls

Tested by 1