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

Skip to content

Commit c139b3d

Browse files
authored
Merge pull request #20829 from tacaswell/tst_simplify_warning_catching
TST: neither warned and pytest upstream deprecated this usage
2 parents 6808f19 + f5ad0d5 commit c139b3d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

lib/matplotlib/tests/test_animation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ def test_save_animation_smoketest(tmpdir, writer, frame_format, output, anim):
180180
with tmpdir.as_cwd():
181181
anim.save(output, fps=30, writer=writer, bitrate=500, dpi=dpi,
182182
codec=codec)
183-
with pytest.warns(None):
184-
del anim
183+
184+
del anim
185185

186186

187187
@pytest.mark.parametrize('writer', [

lib/matplotlib/tests/test_mathtext.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,5 @@ def test_mathtext_cmr10_minus_sign():
437437
mpl.rcParams['axes.formatter.use_mathtext'] = True
438438
fig, ax = plt.subplots()
439439
ax.plot(range(-1, 1), range(-1, 1))
440-
with pytest.warns(None) as record:
441-
fig.canvas.draw()
442-
assert len(record) == 0, "\n".join(str(e.message) for e in record)
440+
# draw to make sure we have no warnings
441+
fig.canvas.draw()

0 commit comments

Comments
 (0)