There was an error while loading. Please reload this page.
1 parent f1b6047 commit 8702cc5Copy full SHA for 8702cc5
2 files changed
lib/matplotlib/tests/test_backend_pdf.py
@@ -307,8 +307,8 @@ def test_text_urls_tex():
307
assert annot.Rect[1] == decimal.Decimal('0.7') * 72
308
309
310
-def test_pdfpages_fspath():
311
- with PdfPages(Path(os.devnull)) as pdf:
+def test_pdfpages_fspath(tmp_path):
+ with PdfPages(tmp_path / 'unused.pdf') as pdf:
312
pdf.savefig(plt.figure())
313
314
lib/matplotlib/tests/test_image.py
@@ -193,8 +193,8 @@ def test_imsave_rgba_origin(origin):
193
194
195
@pytest.mark.parametrize("fmt", ["png", "pdf", "ps", "eps", "svg"])
196
-def test_imsave_fspath(fmt):
197
- plt.imsave(Path(os.devnull), np.array([[0, 1]]), format=fmt)
+def test_imsave_fspath(fmt, tmp_path):
+ plt.imsave(tmp_path / f'unused.{fmt}', np.array([[0, 1]]), format=fmt)
198
199
200
def test_imsave_color_alpha():
0 commit comments