Skip to content

Commit 50aa147

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

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_pytest_mpl.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -232,9 +232,11 @@ def test_succeeds(self):
232232
@pytest.mark.mpl_image_compare
233233
def test_check_equal():
234234
fig_test = plt.figure()
235-
fig_test.subplots().plot([1, 3, 5])
235+
ax_test = fig_test.add_subplot()
236+
ax_test.plot([1, 3, 5])
236237

237238
fig_ref = plt.figure()
238-
fig_ref.subplots().plot([0, 1, 2], [1, 3, 5])
239+
ax_ref = fig_ref.add_subplot()
240+
ax_ref.plot([0, 1, 2], [1, 3, 5])
239241

240242
return fig_test, fig_ref

0 commit comments

Comments
 (0)