()
| 56 | |
| 57 | |
| 58 | def test_text_urls(): |
| 59 | fig = plt.figure() |
| 60 | |
| 61 | test_url = "http://test_text_urls.matplotlib.org" |
| 62 | fig.suptitle("test_text_urls", url=test_url) |
| 63 | |
| 64 | with BytesIO() as fd: |
| 65 | fig.savefig(fd, format='svg') |
| 66 | buf = fd.getvalue().decode() |
| 67 | |
| 68 | expected = f'<a xlink:href="{test_url}" target="_blank">' |
| 69 | assert expected in buf |
| 70 | |
| 71 | |
| 72 | @image_comparison(['bold_font_output.svg'], style='mpl20') |