Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 99dbb0d

Browse files
committed
Unxfail a now fixed test in test_category.
test_mixed_type{,_update}_exception no longer fails with Axes.bar, so unxfail it. We also don't need to provide ids explicitly as pytest now gets them from the method names directly.
1 parent 8979b5c commit 99dbb0d

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

lib/matplotlib/tests/test_category.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -255,19 +255,16 @@ def test_update_plot(self, ax, plotter):
255255

256256
fids, fvalues = zip(*failing_test_cases)
257257

258-
PLOT_BROKEN_LIST = [Axes.scatter,
259-
pytest.param(Axes.plot, marks=pytest.mark.xfail),
260-
pytest.param(Axes.bar, marks=pytest.mark.xfail)]
258+
plotters = [Axes.scatter, Axes.bar,
259+
pytest.param(Axes.plot, marks=pytest.mark.xfail)]
261260

262-
PLOT_BROKEN_IDS = ["scatter", "plot", "bar"]
263-
264-
@pytest.mark.parametrize("plotter", PLOT_BROKEN_LIST, ids=PLOT_BROKEN_IDS)
261+
@pytest.mark.parametrize("plotter", plotters)
265262
@pytest.mark.parametrize("xdata", fvalues, ids=fids)
266263
def test_mixed_type_exception(self, ax, plotter, xdata):
267264
with pytest.raises(TypeError):
268265
plotter(ax, xdata, [1, 2])
269266

270-
@pytest.mark.parametrize("plotter", PLOT_BROKEN_LIST, ids=PLOT_BROKEN_IDS)
267+
@pytest.mark.parametrize("plotter", plotters)
271268
@pytest.mark.parametrize("xdata", fvalues, ids=fids)
272269
def test_mixed_type_update_exception(self, ax, plotter, xdata):
273270
with pytest.raises(TypeError):

0 commit comments

Comments
 (0)