Check that the x and y ticklabel visibility is as specified.
(axs, x_visible, y_visible)
| 27 | |
| 28 | |
| 29 | def check_ticklabel_visible(axs, x_visible, y_visible): |
| 30 | """Check that the x and y ticklabel visibility is as specified.""" |
| 31 | for i, (ax, vx, vy) in enumerate(zip(axs, x_visible, y_visible)): |
| 32 | for l in ax.get_xticklabels() + [ax.xaxis.offsetText]: |
| 33 | assert l.get_visible() == vx, \ |
| 34 | f"Visibility of x axis #{i} is incorrectly {vx}" |
| 35 | for l in ax.get_yticklabels() + [ax.yaxis.offsetText]: |
| 36 | assert l.get_visible() == vy, \ |
| 37 | f"Visibility of y axis #{i} is incorrectly {vy}" |
| 38 | # axis label "visibility" is toggled by label_outer by resetting the |
| 39 | # label to empty, but it can also be empty to start with. |
| 40 | if not vx: |
| 41 | assert ax.get_xlabel() == "" |
| 42 | if not vy: |
| 43 | assert ax.get_ylabel() == "" |
| 44 | |
| 45 | |
| 46 | def check_tick1_visible(axs, x_visible, y_visible): |
no test coverage detected
searching dependent graphs…