MCPcopy
hub / github.com/Textualize/rich / test_broken_getattr

Function test_broken_getattr

tests/test_pretty.py:299–309  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

297
298
299def test_broken_getattr() -> None:
300 class BrokenAttr:
301 def __getattr__(self, name):
302 1 / 0
303
304 def __repr__(self):
305 return "BrokenAttr()"
306
307 test = BrokenAttr()
308 result = pretty_repr(test)
309 assert result == "BrokenAttr()"
310
311
312def test_reference_cycle_container() -> None:

Callers

nothing calls this directly

Calls 2

pretty_reprFunction · 0.90
BrokenAttrClass · 0.85

Tested by

no test coverage detected