@@ -2236,10 +2236,10 @@ def test_bxp_rangewhis():
22362236 _bxp_test_helper (stats_kwargs = dict (whis = [0 , 100 ]))
22372237
22382238
2239- @image_comparison (['bxp_precentilewhis .png' ],
2239+ @image_comparison (['bxp_percentilewhis .png' ],
22402240 savefig_kwarg = {'dpi' : 40 },
22412241 style = 'default' )
2242- def test_bxp_precentilewhis ():
2242+ def test_bxp_percentilewhis ():
22432243 _bxp_test_helper (stats_kwargs = dict (whis = [5 , 95 ]))
22442244
22452245
@@ -2610,28 +2610,24 @@ def test_boxplot_no_weird_whisker():
26102610 ax1 .xaxis .grid (False )
26112611
26122612
2613- def test_boxplot_bad_medians_1 ():
2613+ def test_boxplot_bad_medians ():
26142614 x = np .linspace (- 7 , 7 , 140 )
26152615 x = np .hstack ([- 25 , x , 25 ])
26162616 fig , ax = plt .subplots ()
26172617 with pytest .raises (ValueError ):
26182618 ax .boxplot (x , usermedians = [1 , 2 ])
2619-
2620-
2621- def test_boxplot_bad_medians_2 ():
2622- x = np .linspace (- 7 , 7 , 140 )
2623- x = np .hstack ([- 25 , x , 25 ])
2624- fig , ax = plt .subplots ()
26252619 with pytest .raises (ValueError ):
26262620 ax .boxplot ([x , x ], usermedians = [[1 , 2 ], [1 , 2 ]])
26272621
26282622
2629- def test_boxplot_bad_ci_1 ():
2623+ def test_boxplot_bad_ci ():
26302624 x = np .linspace (- 7 , 7 , 140 )
26312625 x = np .hstack ([- 25 , x , 25 ])
26322626 fig , ax = plt .subplots ()
26332627 with pytest .raises (ValueError ):
26342628 ax .boxplot ([x , x ], conf_intervals = [[1 , 2 ]])
2629+ with pytest .raises (ValueError ):
2630+ ax .boxplot ([x , x ], conf_intervals = [[1 , 2 ], [1 ]])
26352631
26362632
26372633def test_boxplot_zorder ():
@@ -2641,14 +2637,6 @@ def test_boxplot_zorder():
26412637 assert ax .boxplot (x , zorder = 10 )['boxes' ][0 ].get_zorder () == 10
26422638
26432639
2644- def test_boxplot_bad_ci_2 ():
2645- x = np .linspace (- 7 , 7 , 140 )
2646- x = np .hstack ([- 25 , x , 25 ])
2647- fig , ax = plt .subplots ()
2648- with pytest .raises (ValueError ):
2649- ax .boxplot ([x , x ], conf_intervals = [[1 , 2 ], [1 ]])
2650-
2651-
26522640def test_boxplot_marker_behavior ():
26532641 plt .rcParams ['lines.marker' ] = 's'
26542642 plt .rcParams ['boxplot.flierprops.marker' ] = 'o'
@@ -4526,6 +4514,28 @@ def test_pie_textprops():
45264514 assert tx .get_color () == textprops ["color" ]
45274515
45284516
4517+ def test_pie_get_negative_values ():
4518+ # Test the ValueError raised when feeding negative values into axes.pie
4519+ fig , ax = plt .subplots ()
4520+ with pytest .raises (ValueError ):
4521+ ax .pie ([5 , 5 , - 3 ], explode = [0 , .1 , .2 ])
4522+
4523+
4524+ def test_normalize_kwarg_warn_pie ():
4525+ fig , ax = plt .subplots ()
4526+ with pytest .warns (MatplotlibDeprecationWarning ):
4527+ ax .pie (x = [0 ], normalize = None )
4528+
4529+
4530+ def test_normalize_kwarg_pie ():
4531+ fig , ax = plt .subplots ()
4532+ x = [0.3 , 0.3 , 0.1 ]
4533+ t1 = ax .pie (x = x , normalize = True )
4534+ assert abs (t1 [0 ][- 1 ].theta2 - 360. ) < 1e-3
4535+ t2 = ax .pie (x = x , normalize = False )
4536+ assert abs (t2 [0 ][- 1 ].theta2 - 360. ) > 1e-3
4537+
4538+
45294539@image_comparison (['set_get_ticklabels.png' ])
45304540def test_set_get_ticklabels ():
45314541 # test issue 2246
@@ -6234,13 +6244,6 @@ def test_bbox_aspect_axes_init():
62346244 assert_allclose (sizes , sizes [0 ])
62356245
62366246
6237- def test_pi_get_negative_values ():
6238- # Test the ValueError raised when feeding negative values into axes.pie
6239- fig , ax = plt .subplots ()
6240- with pytest .raises (ValueError ):
6241- ax .pie ([5 , 5 , - 3 ], explode = [0 , .1 , .2 ])
6242-
6243-
62446247def test_invisible_axes ():
62456248 # invisible axes should not respond to events...
62466249 fig , ax = plt .subplots ()
@@ -6301,18 +6304,3 @@ def test_polar_interpolation_steps_variable_r(fig_test, fig_ref):
63016304 l .get_path ()._interpolation_steps = 100
63026305 fig_ref .add_subplot (projection = "polar" ).plot (
63036306 np .linspace (0 , np .pi / 2 , 101 ), np .linspace (1 , 2 , 101 ))
6304-
6305-
6306- def test_normalize_kwarg_warn_pie ():
6307- fig , ax = plt .subplots ()
6308- with pytest .warns (MatplotlibDeprecationWarning ):
6309- ax .pie (x = [0 ], normalize = None )
6310-
6311-
6312- def test_normalize_kwarg_pie ():
6313- fig , ax = plt .subplots ()
6314- x = [0.3 , 0.3 , 0.1 ]
6315- t1 = ax .pie (x = x , normalize = True )
6316- assert abs (t1 [0 ][- 1 ].theta2 - 360. ) < 1e-3
6317- t2 = ax .pie (x = x , normalize = False )
6318- assert abs (t2 [0 ][- 1 ].theta2 - 360. ) > 1e-3
0 commit comments