()
| 127 | |
| 128 | |
| 129 | def test_cycle_reset(): |
| 130 | fig, ax = plt.subplots() |
| 131 | prop0 = StringIO() |
| 132 | prop1 = StringIO() |
| 133 | prop2 = StringIO() |
| 134 | |
| 135 | with contextlib.redirect_stdout(prop0): |
| 136 | plt.getp(ax.plot([1, 2], label="label")[0]) |
| 137 | |
| 138 | ax.set_prop_cycle(linewidth=[10, 9, 4]) |
| 139 | with contextlib.redirect_stdout(prop1): |
| 140 | plt.getp(ax.plot([1, 2], label="label")[0]) |
| 141 | assert prop1.getvalue() != prop0.getvalue() |
| 142 | |
| 143 | ax.set_prop_cycle(None) |
| 144 | with contextlib.redirect_stdout(prop2): |
| 145 | plt.getp(ax.plot([1, 2], label="label")[0]) |
| 146 | assert prop2.getvalue() == prop0.getvalue() |
| 147 | |
| 148 | |
| 149 | def test_invalid_input_forms(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…