()
| 39 | |
| 40 | |
| 41 | def test_invalid_line_data(): |
| 42 | with pytest.raises(RuntimeError, match='xdata must be'): |
| 43 | mlines.Line2D(0, []) |
| 44 | with pytest.raises(RuntimeError, match='ydata must be'): |
| 45 | mlines.Line2D([], 1) |
| 46 | |
| 47 | line = mlines.Line2D([], []) |
| 48 | with pytest.raises(RuntimeError, match='x must be'): |
| 49 | line.set_xdata(0) |
| 50 | with pytest.raises(RuntimeError, match='y must be'): |
| 51 | line.set_ydata(0) |
| 52 | |
| 53 | |
| 54 | @image_comparison(['line_dashes'], remove_text=True, style='_classic_test', tol=0.003) |