(ax)
| 471 | |
| 472 | |
| 473 | def test_rectangle_add_remove_set(ax): |
| 474 | tool = widgets.RectangleSelector(ax, interactive=True) |
| 475 | # Draw rectangle |
| 476 | click_and_drag(tool, start=(100, 100), end=(130, 140)) |
| 477 | assert tool.extents == (100, 130, 100, 140) |
| 478 | assert len(tool._state) == 0 |
| 479 | for state in ['rotate', 'square', 'center']: |
| 480 | tool.add_state(state) |
| 481 | assert len(tool._state) == 1 |
| 482 | tool.remove_state(state) |
| 483 | assert len(tool._state) == 0 |
| 484 | |
| 485 | |
| 486 | @pytest.mark.parametrize('use_data_coordinates', [False, True]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…