Skip to content

Commit 6855db9

Browse files
committed
Try to make code in test_check_equal compatible with matplotlib 2.0.2
1 parent 5d0586b commit 6855db9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tests/test_pytest_mpl.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,10 @@ def test_succeeds(self):
231231

232232
@pytest.mark.mpl_image_compare
233233
def test_check_equal():
234-
fig_test = plt.figure()
235-
fig_test.subplots().plot([1, 3, 5])
234+
fig_test, ax_test = plt.subplots()
235+
ax_test.plot([1, 3, 5])
236236

237-
fig_ref = plt.figure()
238-
fig_ref.subplots().plot([0, 1, 2], [1, 3, 5])
237+
fig_ref, ax_ref = plt.subplots()
238+
ax_ref.plot([0, 1, 2], [1, 3, 5])
239239

240240
return fig_test, fig_ref

0 commit comments

Comments
 (0)