From 7219908160f0cfda58a53fcef843282f7f0543bd Mon Sep 17 00:00:00 2001 From: Patrick Hoefler Date: Fri, 10 Feb 2023 11:37:49 +0100 Subject: [PATCH 1/2] CI: Xfail plotting tests --- pandas/tests/plotting/frame/test_frame_subplots.py | 8 ++++++++ pandas/tests/plotting/test_series.py | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/pandas/tests/plotting/frame/test_frame_subplots.py b/pandas/tests/plotting/frame/test_frame_subplots.py index 47d91c7975a28..42285d7b61d40 100644 --- a/pandas/tests/plotting/frame/test_frame_subplots.py +++ b/pandas/tests/plotting/frame/test_frame_subplots.py @@ -6,6 +6,8 @@ import numpy as np import pytest +from pandas.compat import is_platform_linux +from pandas.compat.numpy import np_version_gte1p24 import pandas.util._test_decorators as td import pandas as pd @@ -370,6 +372,9 @@ def test_subplots_dup_columns(self): assert len(ax.lines) == 0 assert len(ax.right_ax.lines) == 5 + @pytest.mark.xfail( + np_version_gte1p24 and is_platform_linux(), reason="Weird rounding problems" + ) def test_bar_log_no_subplots(self): # GH3254, GH3298 matplotlib/matplotlib#1882, #1892 # regressions in 1.2.1 @@ -380,6 +385,9 @@ def test_bar_log_no_subplots(self): ax = df.plot.bar(grid=True, log=True) tm.assert_numpy_array_equal(ax.yaxis.get_ticklocs(), expected) + @pytest.mark.xfail( + np_version_gte1p24 and is_platform_linux(), reason="Weird rounding problems" + ) def test_bar_log_subplots(self): expected = np.array([0.1, 1.0, 10.0, 100.0, 1000.0, 1e4]) diff --git a/pandas/tests/plotting/test_series.py b/pandas/tests/plotting/test_series.py index 3a9aa91002730..ae0de8f97d029 100644 --- a/pandas/tests/plotting/test_series.py +++ b/pandas/tests/plotting/test_series.py @@ -5,6 +5,8 @@ import numpy as np import pytest +from pandas.compat import is_platform_linux +from pandas.compat.numpy import np_version_gte1p24 import pandas.util._test_decorators as td import pandas as pd @@ -238,6 +240,9 @@ def test_line_use_index_false(self): label2 = ax2.get_xlabel() assert label2 == "" + @pytest.mark.xfail( + np_version_gte1p24 and is_platform_linux(), reason="Weird rounding problems" + ) def test_bar_log(self): expected = np.array([1e-1, 1e0, 1e1, 1e2, 1e3, 1e4]) From eb057a5998791a4b40464c1043db718f2a9ba9d9 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler Date: Fri, 10 Feb 2023 13:42:37 +0100 Subject: [PATCH 2/2] Make not strict --- pandas/tests/plotting/frame/test_frame_subplots.py | 8 ++++++-- pandas/tests/plotting/test_series.py | 4 +++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/pandas/tests/plotting/frame/test_frame_subplots.py b/pandas/tests/plotting/frame/test_frame_subplots.py index 42285d7b61d40..0f57ade453564 100644 --- a/pandas/tests/plotting/frame/test_frame_subplots.py +++ b/pandas/tests/plotting/frame/test_frame_subplots.py @@ -373,7 +373,9 @@ def test_subplots_dup_columns(self): assert len(ax.right_ax.lines) == 5 @pytest.mark.xfail( - np_version_gte1p24 and is_platform_linux(), reason="Weird rounding problems" + np_version_gte1p24 and is_platform_linux(), + reason="Weird rounding problems", + strict=False, ) def test_bar_log_no_subplots(self): # GH3254, GH3298 matplotlib/matplotlib#1882, #1892 @@ -386,7 +388,9 @@ def test_bar_log_no_subplots(self): tm.assert_numpy_array_equal(ax.yaxis.get_ticklocs(), expected) @pytest.mark.xfail( - np_version_gte1p24 and is_platform_linux(), reason="Weird rounding problems" + np_version_gte1p24 and is_platform_linux(), + reason="Weird rounding problems", + strict=False, ) def test_bar_log_subplots(self): expected = np.array([0.1, 1.0, 10.0, 100.0, 1000.0, 1e4]) diff --git a/pandas/tests/plotting/test_series.py b/pandas/tests/plotting/test_series.py index ae0de8f97d029..3bb411afbaa3a 100644 --- a/pandas/tests/plotting/test_series.py +++ b/pandas/tests/plotting/test_series.py @@ -241,7 +241,9 @@ def test_line_use_index_false(self): assert label2 == "" @pytest.mark.xfail( - np_version_gte1p24 and is_platform_linux(), reason="Weird rounding problems" + np_version_gte1p24 and is_platform_linux(), + reason="Weird rounding problems", + strict=False, ) def test_bar_log(self): expected = np.array([1e-1, 1e0, 1e1, 1e2, 1e3, 1e4])