@@ -456,22 +456,28 @@ def test_line_lim(self):
456
456
assert xmin <= lines [0 ].get_data ()[0 ][0 ]
457
457
assert xmax >= lines [0 ].get_data ()[0 ][- 1 ]
458
458
459
- def test_area_lim (self ):
459
+ @pytest .mark .xfail (
460
+ strict = False ,
461
+ reason = "2020-12-01 this has been failing periodically on the "
462
+ "ymin==0 assertion for a week or so." ,
463
+ )
464
+ @pytest .mark .parametrize ("stacked" , [True , False ])
465
+ def test_area_lim (self , stacked ):
460
466
df = DataFrame (np .random .rand (6 , 4 ), columns = ["x" , "y" , "z" , "four" ])
461
467
462
468
neg_df = - df
463
- for stacked in [True , False ]:
464
- ax = _check_plot_works (df .plot .area , stacked = stacked )
465
- xmin , xmax = ax .get_xlim ()
466
- ymin , ymax = ax .get_ylim ()
467
- lines = ax .get_lines ()
468
- assert xmin <= lines [0 ].get_data ()[0 ][0 ]
469
- assert xmax >= lines [0 ].get_data ()[0 ][- 1 ]
470
- assert ymin == 0
471
469
472
- ax = _check_plot_works (neg_df .plot .area , stacked = stacked )
473
- ymin , ymax = ax .get_ylim ()
474
- assert ymax == 0
470
+ ax = _check_plot_works (df .plot .area , stacked = stacked )
471
+ xmin , xmax = ax .get_xlim ()
472
+ ymin , ymax = ax .get_ylim ()
473
+ lines = ax .get_lines ()
474
+ assert xmin <= lines [0 ].get_data ()[0 ][0 ]
475
+ assert xmax >= lines [0 ].get_data ()[0 ][- 1 ]
476
+ assert ymin == 0
477
+
478
+ ax = _check_plot_works (neg_df .plot .area , stacked = stacked )
479
+ ymin , ymax = ax .get_ylim ()
480
+ assert ymax == 0
475
481
476
482
def test_area_sharey_dont_overwrite (self ):
477
483
# GH37942
0 commit comments