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

Function test_unicode_won

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

Source from the content-addressed store, hash-verified

210@mpl.style.context('default')
211@needs_usetex
212def test_unicode_won():
213 fig = Figure()
214 fig.text(.5, .5, r'\textwon', usetex=True)
215
216 with BytesIO() as fd:
217 fig.savefig(fd, format='svg')
218 buf = fd.getvalue()
219
220 tree = xml.etree.ElementTree.fromstring(buf)
221 ns = 'http://www.w3.org/2000/svg'
222 won_id = 'SFSS1728-232'
223 assert len(tree.findall(f'.//{{{ns}}}path[@d][@id="{won_id}"]')) == 1
224 assert f'#{won_id}' in tree.find(f'.//{{{ns}}}use').attrib.values()
225
226
227def test_svgnone_with_data_coordinates():

Callers

nothing calls this directly

Calls 4

savefigMethod · 0.95
FigureClass · 0.90
valuesMethod · 0.80
textMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…