def test_identical_bin_edges():
    """Test that an error is raised when two consecutive bins are equal."""
    msg_error = ("At least two consecutive quantiles are equal. "
                 "Consider trying with a smaller number of bins or "
                 "removing timestamps with low variation.")
    mcb = MultipleCoefficientBinning(n_bins=6, strategy='quantile')
    with pytest.raises(ValueError, match=msg_error):
        mcb.fit(np.r_[np.zeros((4, 2)), np.ones((4, 2))])
Test that an error is raised when two consecutive bins are equal.
pyts/approximation/tests/test_mcb.py