8000 Fix test_hist_empty and test_hexbin_empty test cases by creating axes… · matplotlib/matplotlib@cb8539f · GitHub
[go: up one dir, main page]

Skip to content

Commit cb8539f

Browse files
author
Umair Idris
committed
Fix test_hist_empty and test_hexbin_empty test cases by creating axes and d 10000 oing cleanup
1 parent 6deba68 commit cb8539f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,10 @@ def test_hexbin_extent():
482482

483483
ax.hexbin(x, y, extent=[.1, .3, .6, .7])
484484

485+
@cleanup
485486
def test_hexbin_empty():
486487
# From #3886: creating hexbin from empty dataset raises ValueError
488+
ax = plt.gca()
487489
ax.hexbin([], [])
488490

489491
@cleanup
@@ -1004,9 +1006,10 @@ def test_hist_log():
10041006
ax = fig.add_subplot(111)
10051007
ax.hist(data, fill=False, log=True)
10061008

1007-
1009+
@cleanup
10081010
def test_hist_empty():
10091011
# From #3886: creating hist from empty dataset raises ValueError
1012+
ax = plt.gca()
10101013
ax.hist([])
10111014

10121015
@image_comparison(baseline_images=['hist_steplog'], remove_text=True)

0 commit comments

Comments
 (0)
0