Skip to content

Commit 13cad5d

Browse files
committed
fix(comment): #28701 further simplify the test @timhoffm #28702 (comment)
1 parent 573b54d commit 13cad5d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

lib/matplotlib/tests/test_collections.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -831,21 +831,18 @@ def test_collection_set_verts_array():
831831
assert np.array_equal(ap._codes, atp._codes)
832832

833833

834-
@pytest.mark.parametrize("fname", ["fill_between", "fill_betweenx"])
835834
@check_figures_equal(extensions=["png"])
836-
def test_fbp_collection_set_data(fname, fig_test, fig_ref):
835+
def test_fbp_collection_set_data(fig_test, fig_ref):
837836
t = np.linspace(0, 16)
838837
f1 = np.sin(t)
839838
f2 = f1 + 0.2
840839
f3 = f2.copy()
841840
f3[10], f3[20] = f3[20], f3[10]
842841

843-
ax_ref = fig_ref.subplots()
844-
getattr(ax_ref, fname)(t, f1, f2)
842+
fig_ref.subplots().fill_between(t, f1, f2)
845843

846-
ax2 = fig_test.subplots()
847-
coll2 = getattr(ax2, fname)(t, f1, f3)
848-
coll2.set_data(t, f1, f2)
844+
coll = fig_test.subplots().fill_between(t, f1, f3)
845+
coll.set_data(t, f1, f2)
849846

850847

851848
@pytest.mark.parametrize(("t_direction", "shape", "where", "msg"), [

0 commit comments

Comments
 (0)