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

Function test_font_selection

lib/matplotlib/tests/test_texmanager.py:41–46  ·  view source on GitHub ↗
(rc, preamble, family)

Source from the content-addressed store, hash-verified

39 ({"font.family": "courier"}, r"\usepackage{courier}", r"\ttfamily")
40 ])
41def test_font_selection(rc, preamble, family):
42 plt.rcParams.update(rc)
43 tm = TexManager()
44 src = Path(tm.make_tex("hello, world", fontsize=12)).read_text()
45 assert preamble in src
46 assert [*re.findall(r"\\\w+family", src)] == [family]
47
48
49@needs_usetex

Callers

nothing calls this directly

Calls 4

make_texMethod · 0.95
TexManagerClass · 0.90
PathClass · 0.85
updateMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…