Skip to content

Commit 7e83dff

Browse files
committed
Update tests for deprecated behavior
1 parent ec3c8be commit 7e83dff

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

lib/matplotlib/tests/test_triangulation.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,8 @@ def test_tripcolor_color():
280280
with pytest.raises(TypeError,
281281
match="positional.*'c'.*keyword-only.*'facecolors'"):
282282
ax.tripcolor(x, y, C=[1, 2, 3, 4])
283+
with pytest.raises(TypeError, match="Unexpected positional parameter"):
284+
ax.tripcolor(x, y, [1, 2], 'unused_positional')
283285

284286
# smoke test for valid color specifications (via C or facecolors)
285287
ax.tripcolor(x, y, [1, 2, 3, 4]) # edges
@@ -303,9 +305,6 @@ def test_tripcolor_warnings():
303305
y = [0, -1, 0, 1]
304306
c = [0.4, 0.5]
305307
fig, ax = plt.subplots()
306-
# additional parameters
307-
with pytest.warns(DeprecationWarning, match="Additional positional param"):
308-
ax.tripcolor(x, y, c, 'unused_positional')
309308
# facecolors takes precedence over c
310309
with pytest.warns(UserWarning, match="Positional parameter c .*no effect"):
311310
ax.tripcolor(x, y, c, facecolors=c)

lib/matplotlib/tests/test_widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def test_deprecation_selector_visible_attribute(ax):
138138
assert tool.get_visible()
139139

140140
with pytest.warns(mpl.MatplotlibDeprecationWarning,
141-
match="was deprecated in Matplotlib 3.6"):
141+
match="was deprecated in Matplotlib 3.8"):
142142
tool.visible = False
143143
assert not tool.get_visible()
144144

lib/matplotlib/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2429,7 +2429,7 @@ def get_visible(self):
24292429

24302430
@property
24312431
def visible(self):
2432-
_api.warn_deprecated("3.6", alternative="get_visible")
2432+
_api.warn_deprecated("3.8", alternative="get_visible")
24332433
return self.get_visible()
24342434

24352435
def clear(self):

0 commit comments

Comments
 (0)