def METHOD_NAME(n_jobs, monkeypatch):
    """Try building all the dependency graph, without the actual build operations"""
    class MockPackage(buildall.Package):
        def build(self, args: Any) -> None:
            raise ValueError("Failed build")
    monkeypatch.setattr(buildall, "Package", MockPackage)
    pkg_map = buildall.generate_dependency_graph(RECIPE_DIR, {"pkg_1"})
    with pytest.raises(ValueError, match="Failed build"):
        buildall.build_from_graph(
            pkg_map, BuildArgs(), n_jobs=n_jobs, force_rebuild=True
        )