()
| 73 | |
| 74 | |
| 75 | def 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 = """ |
| 82 | RcParams({'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 = """ |
| 91 | font.cursive: ['Zapf Chancery', 'cursive'] |
| 92 | font.family: ['sans-serif'] |
| 93 | font.size: 12.0 |
| 94 | font.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 | |
| 103 | def test_rcparams_update(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…