MCPcopy
hub / github.com/faust-streaming/faust / test_missing_yaml_library

Function test_missing_yaml_library

tests/unit/serializers/test_codecs.py:48–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46
47
48def 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())

Callers

nothing calls this directly

Calls 4

loadsFunction · 0.90
dumpsFunction · 0.90
get_codecFunction · 0.90
loadsMethod · 0.45

Tested by

no test coverage detected