Raise a warning when a previously assigned layout changes to tight using plt.tight_layout().
(layout)
| 773 | |
| 774 | @pytest.mark.parametrize('layout', ['constrained', 'compressed']) |
| 775 | def test_layout_change_warning(layout): |
| 776 | """ |
| 777 | Raise a warning when a previously assigned layout changes to tight using |
| 778 | plt.tight_layout(). |
| 779 | """ |
| 780 | fig, ax = plt.subplots(layout=layout) |
| 781 | with pytest.warns(UserWarning, match='The figure layout has changed to'): |
| 782 | plt.tight_layout() |
| 783 | |
| 784 | |
| 785 | def test_repeated_tightlayout(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…