def test_can_not_decode():
    """Make sure field name is part of the error message"""
    row = {'matrix': 'bogus'}

    with pytest.raises(DecodeFieldError, match='matrix'):
        decode_row(row, MatrixSchema)
Make sure field name is part of the error message
petastorm/tests/test_decode_row.py