Method
test_combinations
(self, proto, meta, good, bad)
Source from the content-addressed store, hash-verified
| 430 | ], |
| 431 | ) |
| 432 | def test_combinations(self, proto, meta, good, bad): |
| 433 | class Ex(msgspec.Struct): |
| 434 | x: Annotated[float, meta] |
| 435 | |
| 436 | dec = proto.Decoder(Ex) |
| 437 | |
| 438 | for x in good: |
| 439 | assert dec.decode(proto.encode(Ex(x))).x == x |
| 440 | |
| 441 | for x in bad: |
| 442 | with pytest.raises(msgspec.ValidationError): |
| 443 | assert dec.decode(proto.encode(Ex(x))) |
| 444 | |
| 445 | |
| 446 | class TestStrConstraints: |
Callers
nothing calls this directly
Tested by
no test coverage detected