From e51b253a418f155540c9d4193e873ce8b9d40b99 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Wed, 9 Mar 2022 10:41:01 -0800 Subject: [PATCH 1/3] CI: xfail geopandas downstream test on MacOS due to fiona install --- pandas/tests/test_downstream.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pandas/tests/test_downstream.py b/pandas/tests/test_downstream.py index ce7c7a634f5a9..ce1e396ad92ac 100644 --- a/pandas/tests/test_downstream.py +++ b/pandas/tests/test_downstream.py @@ -8,6 +8,7 @@ import numpy as np import pytest +from pandas.compat import is_platform_mac import pandas.util._test_decorators as td import pandas as pd @@ -196,6 +197,13 @@ def test_pandas_datareader(): # importing from pandas, Cython import warning @pytest.mark.filterwarnings("ignore:can't resolve:ImportWarning") +@pytest.mark.xfail( + is_platform_mac(), + raises=ImportError, + reason="ImportError: the 'read_file' function requires the 'fiona' package, " + "but it is not installed or does not import correctly", + strict=False, +) def test_geopandas(): geopandas = import_module("geopandas") From 0d9d3e08c842b73258b38c4da28bfef160cc4a6c Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Wed, 9 Mar 2022 14:04:22 -0800 Subject: [PATCH 2/3] More specific case --- pandas/tests/test_downstream.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandas/tests/test_downstream.py b/pandas/tests/test_downstream.py index ce1e396ad92ac..11333022e6b4c 100644 --- a/pandas/tests/test_downstream.py +++ b/pandas/tests/test_downstream.py @@ -8,7 +8,11 @@ import numpy as np import pytest -from pandas.compat import is_platform_mac +from pandas.compat import ( + PY39, + PY310, + is_platform_mac, +) import pandas.util._test_decorators as td import pandas as pd @@ -198,7 +202,7 @@ def test_pandas_datareader(): # importing from pandas, Cython import warning @pytest.mark.filterwarnings("ignore:can't resolve:ImportWarning") @pytest.mark.xfail( - is_platform_mac(), + is_platform_mac() and (PY39 or PY310), raises=ImportError, reason="ImportError: the 'read_file' function requires the 'fiona' package, " "but it is not installed or does not import correctly", From 6b7685287766bf53e8aaf3b86d0080467e271955 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Wed, 9 Mar 2022 15:07:31 -0800 Subject: [PATCH 3/3] Just skip generally for mac --- pandas/tests/test_downstream.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/pandas/tests/test_downstream.py b/pandas/tests/test_downstream.py index 11333022e6b4c..ce1e396ad92ac 100644 --- a/pandas/tests/test_downstream.py +++ b/pandas/tests/test_downstream.py @@ -8,11 +8,7 @@ import numpy as np import pytest -from pandas.compat import ( - PY39, - PY310, - is_platform_mac, -) +from pandas.compat import is_platform_mac import pandas.util._test_decorators as td import pandas as pd @@ -202,7 +198,7 @@ def test_pandas_datareader(): # importing from pandas, Cython import warning @pytest.mark.filterwarnings("ignore:can't resolve:ImportWarning") @pytest.mark.xfail( - is_platform_mac() and (PY39 or PY310), + is_platform_mac(), raises=ImportError, reason="ImportError: the 'read_file' function requires the 'fiona' package, " "but it is not installed or does not import correctly",