Verify that __attrs_pre_init__ gets called if defined.
(self)
| 723 | |
| 724 | @pytest.mark.usefixtures("with_and_without_validation") |
| 725 | def test_pre_init(self): |
| 726 | """ |
| 727 | Verify that __attrs_pre_init__ gets called if defined. |
| 728 | """ |
| 729 | |
| 730 | @attr.s |
| 731 | class C: |
| 732 | def __attrs_pre_init__(self2): |
| 733 | self2.z = 30 |
| 734 | |
| 735 | c = C() |
| 736 | |
| 737 | assert 30 == getattr(c, "z", None) |
| 738 | |
| 739 | @pytest.mark.usefixtures("with_and_without_validation") |
| 740 | def test_pre_init_args(self): |