(axis, labels)
| 159 | |
| 160 | |
| 161 | def axis_test(axis, labels): |
| 162 | ticks = list(range(len(labels))) |
| 163 | np.testing.assert_array_equal(axis.get_majorticklocs(), ticks) |
| 164 | graph_labels = [axis.major.formatter(i, i) for i in ticks] |
| 165 | # _text also decodes bytes as utf-8. |
| 166 | assert graph_labels == [cat.StrCategoryFormatter._text(l) for l in labels] |
| 167 | assert list(axis.units._mapping.keys()) == [l for l in labels] |
| 168 | assert list(axis.units._mapping.values()) == ticks |
| 169 | |
| 170 | |
| 171 | class TestPlotBytes: |
no test coverage detected
searching dependent graphs…