def METHOD_NAME(tmp_path):
    """Ensure a failing test causes cibuildwheel to error out and exit"""
    project_dir = tmp_path / "project"
    output_dir = tmp_path / "output"
    project_with_a_failing_test.generate(project_dir)
    with pytest.raises(subprocess.CalledProcessError):
        utils.cibuildwheel_run(
            project_dir,
            output_dir=output_dir,
            add_env={
                "CIBW_TEST_REQUIRES": "nose",
                "CIBW_TEST_COMMAND": "nosetests {project}/test",
                # manylinux1 has a version of bash that's been shown to have
                # problems with this, so let's check that.
                "CIBW_MANYLINUX_I686_IMAGE": "manylinux1",
                "CIBW_MANYLINUX_X86_64_IMAGE": "manylinux1",
                # CPython 3.8 when running on macOS arm64 is unusual. The build
                # always runs in x86_64, so the arm64 tests are not run. See
                # #1169 for reasons why. That means the build succeeds, which
                # we don't want. So we skip that build.
                "CIBW_SKIP": "cp38-macosx_arm64",
            },
        )
    assert len(os.listdir(output_dir)) == 0