(self, proto)
| 2814 | assert not hasattr(res, "other") |
| 2815 | |
| 2816 | def test_initvars_forbidden(self, proto): |
| 2817 | source = """ |
| 2818 | from dataclasses import dataclass, InitVar |
| 2819 | |
| 2820 | @dataclass |
| 2821 | class Ex: |
| 2822 | a: int |
| 2823 | other: InitVar[int] |
| 2824 | """ |
| 2825 | with temp_module(source) as mod: |
| 2826 | with pytest.raises(TypeError, match="`InitVar` fields are not supported"): |
| 2827 | proto.Decoder(mod.Ex) |
| 2828 | |
| 2829 | @pytest.mark.parametrize("slots", [False, True]) |
| 2830 | def test_decode_dataclass(self, proto, slots): |
nothing calls this directly
no test coverage detected