()
| 134 | |
| 135 | |
| 136 | def test_decode_str_or_bytes_like(): |
| 137 | assert msgspec.yaml.decode("[1, 2]") == [1, 2] |
| 138 | assert msgspec.yaml.decode(b"[1, 2]") == [1, 2] |
| 139 | assert msgspec.yaml.decode(bytearray(b"[1, 2]")) == [1, 2] |
| 140 | assert msgspec.yaml.decode(memoryview(b"[1, 2]")) == [1, 2] |
| 141 | with pytest.raises(TypeError): |
| 142 | msgspec.yaml.decode(1) |
| 143 | |
| 144 | |
| 145 | @pytest.mark.parametrize("msg", [b"{{", b"!!binary 123"]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…