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

Skip to content

Commit d103d48

Browse files
committed
Removed redundancies in test
The second call to set_tick_params would mess the padding up only after the first call was causing size and color to be set incorrectly. Thus the test is changed to ensure the root cause is fixed and not the propagation of it
1 parent 58572ce commit d103d48

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4336,7 +4336,7 @@ def test_pandas_indexing_hist():
43364336
axes.hist(ser_2)
43374337

43384338
@cleanup
4339-
def test_axis_set_tick_params_two_calls():
4339+
def test_axis_set_tick_params_labelsize_labelcolor():
43404340
# Tests fix for issue 4346
43414341
axis_1 = plt.subplot()
43424342
axis_1.yaxis.set_tick_params(labelsize=30, labelcolor='red', direction='out')
@@ -4347,14 +4347,6 @@ def test_axis_set_tick_params_two_calls():
43474347
assert axis_1.yaxis.majorTicks[0]._labelsize == 30.0
43484348
assert axis_1.yaxis.majorTicks[0]._labelcolor == 'red'
43494349

4350-
# This second call to set_tick_params should not change any parameters
4351-
axis_1.yaxis.set_tick_params()
4352-
4353-
assert axis_1.yaxis.majorTicks[0]._size == 4.0
4354-
assert axis_1.yaxis.majorTicks[0]._color == 'k'
4355-
assert axis_1.yaxis.majorTicks[0]._labelsize == 30.0
4356-
assert axis_1.yaxis.majorTicks[0]._labelcolor == 'red'
4357-
43584350
if __name__ == '__main__':
43594351
import nose
43604352
import sys

0 commit comments

Comments
 (0)