(self, fig_test, fig_ref, x, empty_sentinel)
| 1152 | ], |
| 1153 | ) |
| 1154 | def test_empty(self, fig_test, fig_ref, x, empty_sentinel): |
| 1155 | if empty_sentinel != "SKIP": |
| 1156 | kwargs = {"empty_sentinel": empty_sentinel} |
| 1157 | else: |
| 1158 | kwargs = {} |
| 1159 | grid_axes = fig_test.subplot_mosaic(x, **kwargs) |
| 1160 | |
| 1161 | for k, ax in grid_axes.items(): |
| 1162 | ax.set_title(k) |
| 1163 | |
| 1164 | labels = sorted( |
| 1165 | {name for row in x for name in row} - {empty_sentinel, "."} |
| 1166 | ) |
| 1167 | |
| 1168 | assert len(labels) == len(grid_axes) |
| 1169 | |
| 1170 | gs = fig_ref.add_gridspec(2, 2) |
| 1171 | axA = fig_ref.add_subplot(gs[0, 0]) |
| 1172 | axA.set_title(labels[0]) |
| 1173 | |
| 1174 | axB = fig_ref.add_subplot(gs[1, 1]) |
| 1175 | axB.set_title(labels[1]) |
| 1176 | |
| 1177 | def test_fail_list_of_str(self): |
| 1178 | with pytest.raises(ValueError, match='must be 2D'): |
nothing calls this directly
no test coverage detected