From bdb000eee03a6aeb196be4bbc6ed2e5dc023c2f3 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 22 Apr 2022 15:48:42 -0700 Subject: [PATCH 1/3] CI/TST: xfail git test failure on 32 bit job --- pandas/tests/test_common.py | 6 ++++++ pandas/tests/util/test_show_versions.py | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index d31f617b9be15..404e356c28014 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -5,6 +5,11 @@ import numpy as np import pytest +from pandas.compat import ( + IS64, + is_ci_environment, +) + import pandas as pd from pandas import Series import pandas._testing as tm @@ -157,6 +162,7 @@ def test_standardize_mapping(): assert isinstance(com.standardize_mapping(dd), partial) +@pytest.mark.xfail(is_ci_environment() and not IS64, "Failing on 32 bit Python CI job") def test_git_version(): # GH 21295 git_version = pd.__git_version__ diff --git a/pandas/tests/util/test_show_versions.py b/pandas/tests/util/test_show_versions.py index f9a166d0e50cc..08ffd02ef4d2e 100644 --- a/pandas/tests/util/test_show_versions.py +++ b/pandas/tests/util/test_show_versions.py @@ -4,7 +4,11 @@ import pytest -from pandas.compat import is_numpy_dev +from pandas.compat import ( + IS64, + is_ci_environment, + is_numpy_dev, +) from pandas.util._print_versions import ( _get_dependency_info, _get_sys_info, @@ -78,6 +82,7 @@ def test_show_versions_console_json(capsys): assert result == expected +@pytest.mark.xfail(is_ci_environment() and not IS64, "Failing on 32 bit Python CI job") def test_show_versions_console(capsys): # gh-32041 # gh-32041 From e812865a16ab7bad8e4aa5c4f232a9f15c2713ef Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 22 Apr 2022 16:25:10 -0700 Subject: [PATCH 2/3] Add reason kwarg --- pandas/tests/test_common.py | 4 +++- pandas/tests/util/test_show_versions.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index 404e356c28014..71e95555a6f83 100644 --- a/pandas/tests/test_common.py +++ b/pandas/tests/test_common.py @@ -162,7 +162,9 @@ def test_standardize_mapping(): assert isinstance(com.standardize_mapping(dd), partial) -@pytest.mark.xfail(is_ci_environment() and not IS64, "Failing on 32 bit Python CI job") +@pytest.mark.xfail( + is_ci_environment() and not IS64, reason="Failing on 32 bit Python CI job" +) def test_git_version(): # GH 21295 git_version = pd.__git_version__ diff --git a/pandas/tests/util/test_show_versions.py b/pandas/tests/util/test_show_versions.py index 08ffd02ef4d2e..d3bec6940fae8 100644 --- a/pandas/tests/util/test_show_versions.py +++ b/pandas/tests/util/test_show_versions.py @@ -82,7 +82,9 @@ def test_show_versions_console_json(capsys): assert result == expected -@pytest.mark.xfail(is_ci_environment() and not IS64, "Failing on 32 bit Python CI job") +@pytest.mark.xfail( + is_ci_environment() and not IS64, reason="Failing on 32 bit Python CI job" +) def test_show_versions_console(capsys): # gh-32041 # gh-32041 From 41fd88a7879e485e8b0e305c26c859115e101028 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sat, 23 Apr 2022 15:19:18 -0700 Subject: [PATCH 3/3] Ensure docker image has PANDAS_CI=1 --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9b83ed6116ed3..f7c97f0554e0e 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -48,6 +48,7 @@ jobs: pip install cython numpy python-dateutil pytz pytest pytest-xdist pytest-asyncio>=0.17 hypothesis && \ python setup.py build_ext -q -j2 && \ python -m pip install --no-build-isolation -e . && \ + export PANDAS_CI=1 && \ pytest -m 'not slow and not network and not clipboard and not single_cpu' pandas --junitxml=test-data.xml" displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'