<|file_name|>test_bar.py<|end_file_name|><｜fim▁begin｜>''' This file contains tests for the bar plot.
'''
import matplotlib.pyplot as plt
import pytest
import shap

from .utils import explainer # (pytest fixture do not remove) pylint: disable=unused-import


@pytest.mark.mpl_image_compare
def <|fim_middle|>(explainer): # pylint: disable=redefined-outer-name
    """ Check that the bar plot is unchanged.
    """
    shap_values = explainer(explainer.data)
    fig = plt.figure()
    shap.plots.bar(shap_values, show=False)
    plt.tight_layout()
    return fig
<｜fim▁end｜>
test_simple_bar