Method
test_combinations
(self, proto, meta, good, bad)
Source from the content-addressed store, hash-verified
| 509 | ], |
| 510 | ) |
| 511 | def test_combinations(self, proto, meta, good, bad): |
| 512 | class Ex(msgspec.Struct): |
| 513 | x: Annotated[str, meta] |
| 514 | |
| 515 | dec = proto.Decoder(Ex) |
| 516 | |
| 517 | for x in good: |
| 518 | assert dec.decode(proto.encode(Ex(x))).x == x |
| 519 | |
| 520 | for x in bad: |
| 521 | with pytest.raises(msgspec.ValidationError): |
| 522 | dec.decode(proto.encode(Ex(x))) |
| 523 | |
| 524 | @pytest.mark.parametrize( |
| 525 | "meta, good, bad", |
Callers
nothing calls this directly
Tested by
no test coverage detected