def METHOD_NAME():
    with pytest.raises(ValueError):
        with bc():
            def foo():
                raise ValueError
            cleanup(foo)
    assert _current_build_context.value is None