def METHOD_NAME():
    # Check warning error context manager
    n_warns = len(warnings.filters)
    with error_warnings():
        with pytest.raises(UserWarning):
            warnings.warn('A test')
    with error_warnings() as w:  # w not used for anything
        with pytest.raises(UserWarning):
            warnings.warn('A test')
    assert n_warns == len(warnings.filters)
    # Check other errors are propagated
    def f():
        with error_warnings():
            raise ValueError('An error')
    with pytest.raises(ValueError):
        f()