def METHOD_NAME(raw_stencil, error):
    """
    Test that DateStencil raises the appropriate error when initialised with an invalid raw stencil.
    """
    with pytest.raises(error):
        date_stencil = DateStencil(raw_stencil)