Method
test_combinations
(self, proto, meta, good, bad)
Source from the content-addressed store, hash-verified
| 333 | ], |
| 334 | ) |
| 335 | def test_combinations(self, proto, meta, good, bad): |
| 336 | class Ex(msgspec.Struct): |
| 337 | x: Annotated[int, meta] |
| 338 | |
| 339 | dec = proto.Decoder(Ex) |
| 340 | |
| 341 | for x in good: |
| 342 | assert dec.decode(proto.encode(Ex(x))).x == x |
| 343 | |
| 344 | for x in bad: |
| 345 | with pytest.raises(msgspec.ValidationError): |
| 346 | dec.decode(proto.encode(Ex(x))) |
| 347 | |
| 348 | |
| 349 | class TestFloatConstraints: |
Callers
nothing calls this directly
Tested by
no test coverage detected