Skip to content

Commit

Permalink
fix test on plot_bar_chart
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaume-vignal committed Oct 4, 2024
1 parent 026d41b commit e972df3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/unit_tests/explainer/test_smart_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ def test_plot_bar_chart_1(self):
)
expected_output_fig = go.Figure(data=bars, layout=go.Layout(yaxis=dict(type="category")))
self.smart_explainer._case = "regression"
fig_output = plot_bar_chart("ind", var_dict, x_val, contributions)
fig_output = plot_bar_chart("ind", var_dict, x_val, contributions, self.smart_explainer.plot._style_dict)
for part in list(zip(fig_output.data, expected_output_fig.data)):
assert part[0].x == part[1].x
assert part[0].y == part[1].y
Expand All @@ -685,7 +685,7 @@ def test_plot_bar_chart_2(self):
expected_output_fig = go.Figure(data=bars, layout=go.Layout(yaxis=dict(type="category")))

self.smart_explainer._case = "regression"
fig_output = plot_bar_chart("ind", var_dict, x_val, contributions)
fig_output = plot_bar_chart("ind", var_dict, x_val, contributions, self.smart_explainer.plot._style_dict)
for part in list(zip(fig_output.data, expected_output_fig.data)):
assert part[0].x == part[1].x
assert part[0].y == part[1].y
Expand Down

0 comments on commit e972df3

Please sign in to comment.