From a6b8f81932729ca1b92ef4b5ab6045a41f934870 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Sat, 23 Apr 2022 18:19:31 -0700 Subject: [PATCH] CI/TST: xfail git test failure on 32 bit job (#46842) * CI/TST: xfail git test failure on 32 bit job * Add reason kwarg * Ensure docker image has PANDAS_CI=1 (cherry picked from commit 976404bde733c4751da56b41fba0aa95b4c8165d) --- azure-pipelines.yml | 3 ++- pandas/tests/test_common.py | 8 ++++++++ pandas/tests/util/test_show_versions.py | 9 ++++++++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ec798bd607034..d84f2d7784935 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -48,7 +48,8 @@ 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 . && \ - pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml" + 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' - task: PublishTestResults@2 diff --git a/pandas/tests/test_common.py b/pandas/tests/test_common.py index cbd11cd6d8685..b2f2a5f672edb 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,9 @@ def test_standardize_mapping(): assert isinstance(com.standardize_mapping(dd), partial) +@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 54a8f395444ed..468a5e544122c 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, @@ -77,6 +81,9 @@ def test_show_versions_console_json(capsys): assert result == expected +@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