from importlib.util import find_spec


def _pytest_has_xdist() -> bool:
    """
    Check if the pytest-xdist plugin is installed, providing parallel tests
    """
    # Check xdist exists without importing, otherwise pytests emits warnings

    return find_spec("xdist") is not None