def test_band_filters_as_int_warning(sample_input):
    """Test that providing band_filters as int raises a warning and sets band_filters correctly."""
    n_chans = 8
    sfreq = 100
    band_filters_int = 9
    with pytest.warns(UserWarning,
                      match="Creating the filter banks equally divided"):
        layer = FilterBankLayer(n_chans=n_chans, sfreq=sfreq,
                                band_filters=band_filters_int)

    expected_intervals = torch.linspace(4, 40, steps=band_filters_int + 1)
    expected_band_filters = [(low.item(), high.item()) for low, high in
                             zip(expected_intervals[:-1],
                                 expected_intervals[1:])]

    assert layer.band_filters == expected_band_filters, "band_filters not correctly set from int."
    assert layer.n_bands == band_filters_int, "Number of bands should match the provided int."
Test that providing band_filters as int raises a warning and sets band_filters correctly.
test/unit_tests/models/test_modules.py