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

Method test_one_repr_empty

testing/test_assertion.py:748–756  ·  view source on GitHub ↗

The faulty empty string repr did trigger an unbound local error in _diff_text.

(self)

Source from the content-addressed store, hash-verified

746 ]
747
748 def test_one_repr_empty(self) -> None:
749 """The faulty empty string repr did trigger an unbound local error in _diff_text."""
750
751 class A(str):
752 def __repr__(self):
753 return ""
754
755 expl = callequal(A(), "")
756 assert not expl
757
758 def test_repr_no_exc(self) -> None:
759 expl = callequal("foo", "bar")

Callers

nothing calls this directly

Calls 2

callequalFunction · 0.85
AClass · 0.70

Tested by

no test coverage detected