From 46ed163505aabe89b869a34c9ba7b8455ad0cd98 Mon Sep 17 00:00:00 2001 From: Brock Date: Thu, 26 Jan 2023 14:23:07 -0800 Subject: [PATCH] PERF: conditionally mark xfails as slow --- pandas/tests/extension/test_arrow.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pandas/tests/extension/test_arrow.py b/pandas/tests/extension/test_arrow.py index e51b0aa318582..d912ab59ab025 100644 --- a/pandas/tests/extension/test_arrow.py +++ b/pandas/tests/extension/test_arrow.py @@ -429,6 +429,12 @@ def test_accumulate_series(self, data, all_numeric_accumulations, skipna, reques ) if all_numeric_accumulations != "cumsum" or pa_version_under9p0: + if request.config.option.skip_slow: + # equivalent to marking these cases with @pytest.mark.slow, + # these xfails take a long time to run because pytest + # renders the exception messages even when not showing them + pytest.skip("pyarrow xfail slow") + request.node.add_marker( pytest.mark.xfail( reason=f"{all_numeric_accumulations} not implemented", @@ -770,7 +776,9 @@ class TestBaseIndex(base.BaseIndexTests): class TestBaseInterface(base.BaseInterfaceTests): - @pytest.mark.xfail(reason="GH 45419: pyarrow.ChunkedArray does not support views.") + @pytest.mark.xfail( + reason="GH 45419: pyarrow.ChunkedArray does not support views.", run=False + ) def test_view(self, data): super().test_view(data) @@ -800,13 +808,17 @@ class TestBasePrinting(base.BasePrintingTests): class TestBaseReshaping(base.BaseReshapingTests): - @pytest.mark.xfail(reason="GH 45419: pyarrow.ChunkedArray does not support views") + @pytest.mark.xfail( + reason="GH 45419: pyarrow.ChunkedArray does not support views", run=False + ) def test_transpose(self, data): super().test_transpose(data) class TestBaseSetitem(base.BaseSetitemTests): - @pytest.mark.xfail(reason="GH 45419: pyarrow.ChunkedArray does not support views") + @pytest.mark.xfail( + reason="GH 45419: pyarrow.ChunkedArray does not support views", run=False + ) def test_setitem_preserves_views(self, data): super().test_setitem_preserves_views(data)