()
| 147 | |
| 148 | |
| 149 | def test_invalid_input_forms(): |
| 150 | fig, ax = plt.subplots() |
| 151 | |
| 152 | with pytest.raises((TypeError, ValueError)): |
| 153 | ax.set_prop_cycle(1) |
| 154 | with pytest.raises((TypeError, ValueError)): |
| 155 | ax.set_prop_cycle([1, 2]) |
| 156 | |
| 157 | with pytest.raises((TypeError, ValueError)): |
| 158 | ax.set_prop_cycle('color', 'fish') |
| 159 | |
| 160 | with pytest.raises((TypeError, ValueError)): |
| 161 | ax.set_prop_cycle('linewidth', 1) |
| 162 | with pytest.raises((TypeError, ValueError)): |
| 163 | ax.set_prop_cycle('linewidth', {1, 2}) |
| 164 | with pytest.raises((TypeError, ValueError)): |
| 165 | ax.set_prop_cycle(linewidth=1, color='r') |
| 166 | |
| 167 | with pytest.raises((TypeError, ValueError)): |
| 168 | ax.set_prop_cycle('foobar', [1, 2]) |
| 169 | with pytest.raises((TypeError, ValueError)): |
| 170 | ax.set_prop_cycle(foobar=[1, 2]) |
| 171 | |
| 172 | with pytest.raises((TypeError, ValueError)): |
| 173 | ax.set_prop_cycle(cycler(foobar=[1, 2])) |
| 174 | with pytest.raises(ValueError): |
| 175 | ax.set_prop_cycle(cycler(color='rgb', c='cmy')) |
nothing calls this directly
no test coverage detected
searching dependent graphs…