Skip to content

Commit 7249249

Browse files
authored
Merge pull request #10200 from dstansby/normed-warning
TST: Catch normed warning in tests
2 parents cb2b9dd + dc6f72b commit 7249249

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2930,9 +2930,9 @@ def test_hist_stacked_normed():
29302930
# make some data
29312931
d1 = np.linspace(1, 3, 20)
29322932
d2 = np.linspace(0, 10, 50)
2933-
fig = plt.figure()
2934-
ax = fig.add_subplot(111)
2935-
ax.hist((d1, d2), stacked=True, normed=True)
2933+
fig, ax = plt.subplots()
2934+
with pytest.warns(UserWarning):
2935+
ax.hist((d1, d2), stacked=True, normed=True)
29362936

29372937

29382938
@image_comparison(baseline_images=['hist_stacked_normed'], extensions=['png'])

0 commit comments

Comments
 (0)