def test_schema_from_file(): parsed = schema.load(data_gen.get_schema_path("adv_schema.avsc")) assert isinstance(parsed, schema.AvroSchema)
def test_schema_load_parse_error(): with pytest.raises(fastavro.schema.UnknownType): schema.load(data_gen.get_schema_path("invalid_schema.avsc"))
def test_schema_load_parse_error(): with pytest.raises(errors.ClientError) as excinfo: load.load(data_gen.get_schema_path("invalid_scema.avsc")) assert "Schema parse failed:" in str(excinfo.value)