From dc6f72b7121616fa256264587f0704150b9bbc56 Mon Sep 17 00:00:00 2001 From: David Stansby Date: Tue, 9 Jan 2018 13:37:10 +0000 Subject: [PATCH] Catch normed warning in tests --- lib/matplotlib/tests/test_axes.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 34cba9d75c51..7636d8dd215b 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -2930,9 +2930,9 @@ def test_hist_stacked_normed(): # make some data d1 = np.linspace(1, 3, 20) d2 = np.linspace(0, 10, 50) - fig = plt.figure() - ax = fig.add_subplot(111) - ax.hist((d1, d2), stacked=True, normed=True) + fig, ax = plt.subplots() + with pytest.warns(UserWarning): + ax.hist((d1, d2), stacked=True, normed=True) @image_comparison(baseline_images=['hist_stacked_normed'], extensions=['png'])