Skip to content

Commit

Permalink
Add additional tests for plot_forest
Browse files Browse the repository at this point in the history
  • Loading branch information
canyon289 committed Jan 15, 2019
1 parent e34763d commit e1fc65f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions arviz/tests/test_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ def test_plot_trace_discrete(discrete_model):
[
({}, 1),
({"var_names": "mu"}, 1),
({"var_names": "mu", "rope": (-1, 1)}, 1),
({"r_hat": True, "quartiles": False}, 2),
({"var_names": ["mu"], "colors": "C0", "eff_n": True, "combined": True}, 2),
({"kind": "ridgeplot", "r_hat": True, "eff_n": True}, 3),
Expand All @@ -196,6 +197,12 @@ def test_plot_forest(models, model_fits, args_expected):
assert axes.shape == (expected,)


def test_plot_forest_rope_exception():
with pytest.raises(ValueError) as err:
plot_forest({"x": [1]}, rope="not_correct_format")
assert "Argument `rope` must be None, a dictionary like" in str(err)


def test_plot_forest_single_value():
_, axes = plot_forest({"x": [1]})
assert axes.shape
Expand Down

0 comments on commit e1fc65f

Please sign in to comment.