Skip to content

Commit 3f08548

Browse files
committed
Simplify test
1 parent b44077d commit 3f08548

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

lib/matplotlib/tests/test_axes.py

+2-12
Original file line numberDiff line numberDiff line change
@@ -435,21 +435,11 @@ def test_basic_annotate():
435435

436436

437437
def test_annotate_parameter_warn():
438-
# Setup some data
439-
t = np.arange(0.0, 5.0, 0.01)
440-
s = np.cos(2.0*np.pi * t)
441-
442-
# Offset Points
443-
444-
fig = plt.figure()
445-
ax = fig.add_subplot(111, autoscale_on=False, xlim=(-1, 5), ylim=(-3, 5))
446-
line, = ax.plot(t, s, lw=3, color='purple')
447-
438+
fig, ax = plt.subplots()
448439
with pytest.warns(MatplotlibDeprecationWarning,
449440
match=r"The \'s\' parameter of annotate\(\) "
450441
"has been renamed \'text\'"):
451-
ax.annotate(s='local max', xy=(3, 1), xycoords='data',
452-
xytext=(3, 3), textcoords='offset points')
442+
ax.annotate(s='now named text', xy=(0, 1))
453443

454444

455445
@image_comparison(['arrow_simple.png'], remove_text=True)

0 commit comments

Comments
 (0)