| 36 | |
| 37 | |
| 38 | def test_SubplotParams(): |
| 39 | s = gridspec.SubplotParams(.1, .1, .9, .9) |
| 40 | assert s.left == 0.1 |
| 41 | |
| 42 | s.reset() |
| 43 | assert s.left == matplotlib.rcParams['figure.subplot.left'] |
| 44 | |
| 45 | with pytest.raises(ValueError, match='left cannot be >= right'): |
| 46 | s.update(left=s.right + .01) |
| 47 | |
| 48 | with pytest.raises(ValueError, match='bottom cannot be >= top'): |
| 49 | s.update(bottom=s.top + .01) |
| 50 | |
| 51 | with pytest.raises(ValueError, match='left cannot be >= right'): |
| 52 | gridspec.SubplotParams(.1, .1, .09, .9) |
| 53 | |
| 54 | |
| 55 | def test_repr(): |