TypeError isn't swallowed when validation fails within evolve.
(self)
| 723 | assert e.value.args[0].endswith(expected) |
| 724 | |
| 725 | def test_validator_failure(self): |
| 726 | """ |
| 727 | TypeError isn't swallowed when validation fails within evolve. |
| 728 | """ |
| 729 | |
| 730 | @attr.s |
| 731 | class C: |
| 732 | a = attr.ib(validator=instance_of(int)) |
| 733 | |
| 734 | with pytest.raises(TypeError) as e: |
| 735 | evolve(C(a=1), a="some string") |
| 736 | m = e.value.args[0] |
| 737 | |
| 738 | assert m.startswith("'a' must be <class 'int'>") |
| 739 | |
| 740 | def test_private(self): |
| 741 | """ |