Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7a9130c

Browse files
put SymLogNorm-colorbar test into separate function
1 parent 0164a41 commit 7a9130c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/matplotlib/tests/test_colors.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,12 @@ def test_SymLogNorm():
224224
normed_vals = norm(vals)
225225
assert_array_almost_equal(normed_vals, expected)
226226

227-
# Ensure that a SymLogNorm object can be used in a colorbar
228-
# without directly calling it on an array.
227+
228+
@cleanup
229+
def test_SymLogNorm_colorbar():
230+
"""
231+
Test un-called SymLogNorm in a colorbar.
232+
"""
229233
norm = mcolors.SymLogNorm(0.1, vmin=-1, vmax=1, linscale=1)
230234
fig = plt.figure()
231235
cbar = mcolorbar.ColorbarBase(fig.add_subplot(111), norm=norm)

0 commit comments

Comments
 (0)