@@ -2236,10 +2236,10 @@ def test_bxp_rangewhis():
2236
2236
_bxp_test_helper (stats_kwargs = dict (whis = [0 , 100 ]))
2237
2237
2238
2238
2239
- @image_comparison (['bxp_precentilewhis .png' ],
2239
+ @image_comparison (['bxp_percentilewhis .png' ],
2240
2240
savefig_kwarg = {'dpi' : 40 },
2241
2241
style = 'default' )
2242
- def test_bxp_precentilewhis ():
2242
+ def test_bxp_percentilewhis ():
2243
2243
_bxp_test_helper (stats_kwargs = dict (whis = [5 , 95 ]))
2244
2244
2245
2245
@@ -2610,28 +2610,24 @@ def test_boxplot_no_weird_whisker():
2610
2610
ax1 .xaxis .grid (False )
2611
2611
2612
2612
2613
- def test_boxplot_bad_medians_1 ():
2613
+ def test_boxplot_bad_medians ():
2614
2614
x = np .linspace (- 7 , 7 , 140 )
2615
2615
x = np .hstack ([- 25 , x , 25 ])
2616
2616
fig , ax = plt .subplots ()
2617
2617
with pytest .raises (ValueError ):
2618
2618
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 ()
2625
2619
with pytest .raises (ValueError ):
2626
2620
ax .boxplot ([x , x ], usermedians = [[1 , 2 ], [1 , 2 ]])
2627
2621
2628
2622
2629
- def test_boxplot_bad_ci_1 ():
2623
+ def test_boxplot_bad_ci ():
2630
2624
x = np .linspace (- 7 , 7 , 140 )
2631
2625
x = np .hstack ([- 25 , x , 25 ])
2632
2626
fig , ax = plt .subplots ()
2633
2627
with pytest .raises (ValueError ):
2634
2628
ax .boxplot ([x , x ], conf_intervals = [[1 , 2 ]])
2629
+ with pytest .raises (ValueError ):
2630
+ ax .boxplot ([x , x ], conf_intervals = [[1 , 2 ], [1 ]])
2635
2631
2636
2632
2637
2633
def test_boxplot_zorder ():
@@ -2641,14 +2637,6 @@ def test_boxplot_zorder():
2641
2637
assert ax .boxplot (x , zorder = 10 )['boxes' ][0 ].get_zorder () == 10
2642
2638
2643
2639
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
-
2652
2640
def test_boxplot_marker_behavior ():
2653
2641
plt .rcParams ['lines.marker' ] = 's'
2654
2642
plt .rcParams ['boxplot.flierprops.marker' ] = 'o'
@@ -4526,6 +4514,28 @@ def test_pie_textprops():
4526
4514
assert tx .get_color () == textprops ["color" ]
4527
4515
4528
4516
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
+
4529
4539
@image_comparison (['set_get_ticklabels.png' ])
4530
4540
def test_set_get_ticklabels ():
4531
4541
# test issue 2246
@@ -6234,13 +6244,6 @@ def test_bbox_aspect_axes_init():
6234
6244
assert_allclose (sizes , sizes [0 ])
6235
6245
6236
6246
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
-
6244
6247
def test_invisible_axes ():
6245
6248
# invisible axes should not respond to events...
6246
6249
fig , ax = plt .subplots ()
@@ -6301,18 +6304,3 @@ def test_polar_interpolation_steps_variable_r(fig_test, fig_ref):
6301
6304
l .get_path ()._interpolation_steps = 100
6302
6305
fig_ref .add_subplot (projection = "polar" ).plot (
6303
6306
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