MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_text_urls

Function test_text_urls

lib/matplotlib/tests/test_backend_svg.py:58–69  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

56
57
58def 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')

Callers

nothing calls this directly

Calls 3

figureMethod · 0.80
suptitleMethod · 0.80
savefigMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…