Skip to content

Commit 43928e6

Browse files
authored
CI: xfail test_area_lim (#38212)
1 parent 2a115d5 commit 43928e6

File tree

1 file changed

+18
-12
lines changed

1 file changed

+18
-12
lines changed

pandas/tests/plotting/frame/test_frame.py

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -456,22 +456,28 @@ def test_line_lim(self):
456456
assert xmin <= lines[0].get_data()[0][0]
457457
assert xmax >= lines[0].get_data()[0][-1]
458458

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):
460466
df = DataFrame(np.random.rand(6, 4), columns=["x", "y", "z", "four"])
461467

462468
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
471469

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
475481

476482
def test_area_sharey_dont_overwrite(self):
477483
# GH37942

0 commit comments

Comments
 (0)