def test_available_accelerators_in_registry():
    """Tests the accelerators available by default, not including external, third-party accelerators."""
    available = AcceleratorRegistry.available_accelerators()
    expected = {"cpu", "cuda", "mps", "tpu"}
    # Note: the registry is global, other tests may register new strategies as a side effect
    assert expected.issubset(available)
Tests the accelerators available by default, not including external, third-party accelerators.
tests/tests_pytorch/accelerators/test_registry.py