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

Skip to content

Commit 537946e

Browse files
committed
TST: add test for min/max extents
1 parent d59bd35 commit 537946e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/tests/test_colorbar.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,11 +457,12 @@ def test_colorbar_get_ticks():
457457
assert len(cbar.get_ticks(minor=True)) == 0
458458

459459

460-
def test_colorbar_lognorm_extension():
460+
@pytest.mark.parametrize("extend", ['both', 'min', 'max'])
461+
def test_colorbar_lognorm_extension(extend):
461462
# Test that colorbar with lognorm is extended correctly
462463
f, ax = plt.subplots()
463464
cb = ColorbarBase(ax, norm=LogNorm(vmin=0.1, vmax=1000.0),
464-
orientation='vertical', extend='both')
465+
orientation='vertical', extend=extend)
465466
assert cb._values[0] >= 0.0
466467

467468

0 commit comments

Comments
 (0)