()
| 186 | |
| 187 | |
| 188 | def test_image(): |
| 189 | # Test fails for matplotlib 1.5+ because the size of the image |
| 190 | # generated by matplotlib has changed. |
| 191 | if Version(matplotlib.__version__) == Version("3.4.1"): |
| 192 | image_size = 432 |
| 193 | else: |
| 194 | pytest.skip("Test fails for older matplotlib") |
| 195 | np.random.seed(0) # image size depends on the seed |
| 196 | fig, ax = plt.subplots(figsize=(2, 2)) |
| 197 | ax.imshow(np.random.random((10, 10)), cmap=plt.cm.jet, interpolation="nearest") |
| 198 | _assert_output_equal( |
| 199 | fake_renderer_output(fig, FakeRenderer), |
| 200 | f""" |
| 201 | opening figure |
| 202 | opening axes |
| 203 | draw image of size {image_size} |
| 204 | closing axes |
| 205 | closing figure |
| 206 | """, |
| 207 | ) |
| 208 | |
| 209 | |
| 210 | def test_legend(): |
nothing calls this directly
no test coverage detected