()
| 167 | |
| 168 | |
| 169 | def test_decode_dec_hook(): |
| 170 | def dec_hook(typ, val): |
| 171 | if typ is Decimal: |
| 172 | return Decimal(val) |
| 173 | raise TypeError |
| 174 | |
| 175 | res = msgspec.yaml.decode("'1.5'", type=Decimal, dec_hook=dec_hook) |
| 176 | assert res == Decimal("1.5") |
nothing calls this directly
no test coverage detected
searching dependent graphs…