()
| 46 | |
| 47 | |
| 48 | def test_missing_yaml_library() -> None: |
| 49 | msg = "Missing yaml: pip install PyYAML" |
| 50 | |
| 51 | with patch("faust.serializers.codecs._yaml", None): |
| 52 | with pytest.raises(ImproperlyConfigured): |
| 53 | loads("yaml", dumps("yaml", DATA)) |
| 54 | pytest.fail(msg) |
| 55 | |
| 56 | with pytest.raises(ImproperlyConfigured): |
| 57 | get_codec("yaml").loads(b"") |
| 58 | pytest.fail(msg) |
| 59 | |
| 60 | |
| 61 | @given(binary()) |