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

Skip to content

Commit 2cbfdb3

Browse files
committed
corrections in test_set_clim_emits_single_callback
1 parent 42e8768 commit 2cbfdb3

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/matplotlib/tests/test_colors.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,17 +1613,14 @@ def test_set_clim_emits_single_callback():
16131613
callback = unittest.mock.Mock()
16141614
image.norm.callbacks.connect('changed', callback)
16151615

1616-
# Initial callback count should be zero
1617-
assert callback.call_count == 0
1616+
callback.assert_not_called()
16181617

16191618
# Call set_clim() to update the limits
16201619
image.set_clim(1, 5)
16211620

16221621
# Assert that only one "changed" callback is sent after calling set_clim()
16231622
callback.assert_called_once()
16241623

1625-
plt.close(fig)
1626-
16271624

16281625
def test_norm_callback():
16291626
increment = unittest.mock.Mock(return_value=None)

0 commit comments

Comments
 (0)