The faulty empty string repr did trigger an unbound local error in _diff_text.
(self)
| 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") |