diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index d3869ad9d256..652858b3b749 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -59,6 +59,16 @@ def test_get_labels(): assert ax.get_ylabel() == 'y label' +def test_repr(): + fig, ax = plt.subplots() + ax.set_label('label') + ax.set_title('title') + ax.set_xlabel('x') + ax.set_ylabel('y') + assert repr(ax) == ("") + + @check_figures_equal() def test_label_loc_vertical(fig_test, fig_ref): ax = fig_test.subplots() diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py index 505cb4f0c50f..94f1fa19aec8 100644 --- a/lib/mpl_toolkits/tests/test_mplot3d.py +++ b/lib/mpl_toolkits/tests/test_mplot3d.py @@ -34,6 +34,19 @@ def test_aspect_equal_error(): ax.set_aspect('equal') +def test_axes3d_repr(): + fig = plt.figure() + ax = fig.add_subplot(projection='3d') + ax.set_label('label') + ax.set_title('title') + ax.set_xlabel('x') + ax.set_ylabel('y') + ax.set_zlabel('z') + assert repr(ax) == ("") + + @mpl3d_image_comparison(['bar3d.png']) def test_bar3d(): fig = plt.figure()