def test_y_none_entropy():
    """Test that an error is raised when y is None and 'entropy' is used."""
    msg_error = "y cannot be None if strategy='entropy'."
    mcb = MultipleCoefficientBinning(n_bins=2, strategy='entropy')
    with pytest.raises(ValueError, match=msg_error):
        mcb.fit(X, None)
Test that an error is raised when y is None and 'entropy' is used.
pyts/approximation/tests/test_mcb.py