(fig_test, fig_ref)
| 180 | |
| 181 | @check_figures_equal() |
| 182 | def test_rotate_rect_draw(fig_test, fig_ref): |
| 183 | ax_test = fig_test.add_subplot() |
| 184 | ax_ref = fig_ref.add_subplot() |
| 185 | |
| 186 | loc = (0, 0) |
| 187 | width, height = (1, 1) |
| 188 | angle = 30 |
| 189 | rect_ref = Rectangle(loc, width, height, angle=angle) |
| 190 | ax_ref.add_patch(rect_ref) |
| 191 | assert rect_ref.get_angle() == angle |
| 192 | |
| 193 | # Check that when the angle is updated after adding to an Axes, that the |
| 194 | # patch is marked stale and redrawn in the correct location |
| 195 | rect_test = Rectangle(loc, width, height) |
| 196 | assert rect_test.get_angle() == 0 |
| 197 | ax_test.add_patch(rect_test) |
| 198 | rect_test.set_angle(angle) |
| 199 | assert rect_test.get_angle() == angle |
| 200 | |
| 201 | |
| 202 | @check_figures_equal() |
nothing calls this directly
no test coverage detected
searching dependent graphs…