(tmp_path)
| 65 | |
| 66 | |
| 67 | def test_multipage_keep_empty(tmp_path): |
| 68 | # An empty pdf deletes itself afterwards. |
| 69 | fn = tmp_path / "a.pdf" |
| 70 | with PdfPages(fn) as pdf: |
| 71 | pass |
| 72 | assert not fn.exists() |
| 73 | |
| 74 | # Test pdf files with content, they should never be deleted. |
| 75 | fn = tmp_path / "b.pdf" |
| 76 | with PdfPages(fn) as pdf: |
| 77 | pdf.savefig(plt.figure()) |
| 78 | assert fn.exists() |
| 79 | |
| 80 | |
| 81 | def test_composite_image(): |