Exactly one of *xy2* and *slope* must be specified.
()
| 5737 | |
| 5738 | |
| 5739 | def test_axline_args(): |
| 5740 | """Exactly one of *xy2* and *slope* must be specified.""" |
| 5741 | fig, ax = plt.subplots() |
| 5742 | with pytest.raises(TypeError): |
| 5743 | ax.axline((0, 0)) # missing second parameter |
| 5744 | with pytest.raises(TypeError): |
| 5745 | ax.axline((0, 0), (1, 1), slope=1) # redundant parameters |
| 5746 | ax.set_xscale('log') |
| 5747 | with pytest.raises(TypeError): |
| 5748 | ax.axline((0, 0), slope=1) |
| 5749 | ax.set_xscale('linear') |
| 5750 | ax.set_yscale('log') |
| 5751 | with pytest.raises(TypeError): |
| 5752 | ax.axline((0, 0), slope=1) |
| 5753 | ax.set_yscale('linear') |
| 5754 | with pytest.raises(ValueError): |
| 5755 | ax.axline((0, 0), (0, 0)) # two identical points are not allowed |
| 5756 | plt.draw() |
| 5757 | |
| 5758 | |
| 5759 | @image_comparison(['vlines_basic.png', 'vlines_with_nan.png', 'vlines_masked.png'], |
nothing calls this directly
no test coverage detected
searching dependent graphs…