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

Function test_RcParams_class

lib/matplotlib/tests/test_rcparams.py:75–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73
74
75def test_RcParams_class():
76 rc = mpl.RcParams({'font.cursive': ['Zapf Chancery', 'cursive'],
77 'font.family': 'sans-serif',
78 'font.weight': 'normal',
79 'font.size': 12})
80
81 expected_repr = """
82RcParams({'font.cursive': ['Zapf Chancery', 'cursive'],
83 'font.family': ['sans-serif'],
84 'font.size': 12.0,
85 'font.weight': 'normal'})""".lstrip()
86
87 actual_repr = repr(rc)
88 assert actual_repr == expected_repr
89
90 expected_str = """
91font.cursive: ['Zapf Chancery', 'cursive']
92font.family: ['sans-serif']
93font.size: 12.0
94font.weight: normal""".lstrip()
95
96 assert str(rc) == expected_str
97
98 # test the find_all functionality
99 assert ['font.cursive', 'font.size'] == sorted(rc.find_all('i[vz]'))
100 assert ['font.family'] == list(rc.find_all('family'))
101
102
103def test_rcparams_update():

Callers

nothing calls this directly

Calls 1

find_allMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…