diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 113ad3e338952..b1091ea7f60e4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -26,3 +26,28 @@ jobs: parameters: name: Windows vmImage: vs2017-win2016 + +- job: py37_32bit + pool: + vmImage: ubuntu-18.04 + + steps: + - script: | + docker pull quay.io/pypa/manylinux2014_i686 + docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \ + /bin/bash -xc "cd pandas && \ + /opt/python/cp37-cp37m/bin/python -m venv ~/virtualenvs/pandas-dev && \ + . ~/virtualenvs/pandas-dev/bin/activate && \ + python -m pip install --no-deps -U pip wheel setuptools && \ + pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \ + python setup.py build_ext -q -i -j2 && \ + python -m pip install --no-build-isolation -e . && \ + pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml" + displayName: 'Run 32-bit manylinux2014 Docker Build / Tests' + + - task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testResultsFiles: '**/test-*.xml' + failTaskOnFailedTests: true + testRunTitle: 'Publish test results for Python 3.7-32 bit full Linux' diff --git a/pandas/tests/arrays/floating/test_function.py b/pandas/tests/arrays/floating/test_function.py index 2767d93741d4c..baf60a363ad29 100644 --- a/pandas/tests/arrays/floating/test_function.py +++ b/pandas/tests/arrays/floating/test_function.py @@ -1,6 +1,8 @@ import numpy as np import pytest +from pandas.compat import IS64 + import pandas as pd import pandas._testing as tm @@ -71,6 +73,7 @@ def test_ufunc_reduce_raises(values): np.add.reduce(a) +@pytest.mark.skipif(not IS64, reason="GH 36579: fail on 32-bit system") @pytest.mark.parametrize( "pandasmethname, kwargs", [ diff --git a/pandas/tests/base/test_misc.py b/pandas/tests/base/test_misc.py index f7952c81cfd61..6a9d58021a4d9 100644 --- a/pandas/tests/base/test_misc.py +++ b/pandas/tests/base/test_misc.py @@ -3,7 +3,7 @@ import numpy as np import pytest -from pandas.compat import PYPY +from pandas.compat import IS64, PYPY from pandas.core.dtypes.common import ( is_categorical_dtype, @@ -128,7 +128,10 @@ def test_memory_usage(index_or_series_obj): ) if len(obj) == 0: - expected = 0 if isinstance(obj, Index) else 80 + if isinstance(obj, Index): + expected = 0 + else: + expected = 80 if IS64 else 48 assert res_deep == res == expected elif is_object or is_categorical: # only deep will pick them up diff --git a/pandas/tests/groupby/test_groupby.py b/pandas/tests/groupby/test_groupby.py index 2e51fca71e139..b57fa2540add9 100644 --- a/pandas/tests/groupby/test_groupby.py +++ b/pandas/tests/groupby/test_groupby.py @@ -1268,8 +1268,8 @@ def test_groupby_nat_exclude(): assert grouped.ngroups == 2 expected = { - Timestamp("2013-01-01 00:00:00"): np.array([1, 7], dtype=np.int64), - Timestamp("2013-02-01 00:00:00"): np.array([3, 5], dtype=np.int64), + Timestamp("2013-01-01 00:00:00"): np.array([1, 7], dtype=np.intp), + Timestamp("2013-02-01 00:00:00"): np.array([3, 5], dtype=np.intp), } for k in grouped.indices: diff --git a/pandas/tests/io/formats/test_info.py b/pandas/tests/io/formats/test_info.py index 418d05a6b8752..8c2155aec7248 100644 --- a/pandas/tests/io/formats/test_info.py +++ b/pandas/tests/io/formats/test_info.py @@ -7,7 +7,7 @@ import numpy as np import pytest -from pandas.compat import PYPY +from pandas.compat import IS64, PYPY from pandas import ( CategoricalIndex, @@ -475,6 +475,7 @@ def test_info_categorical(): df.info(buf=buf) +@pytest.mark.xfail(not IS64, reason="GH 36579: fail on 32-bit system") def test_info_int_columns(): # GH#37245 df = DataFrame({1: [1, 2], 2: [2, 3]}, index=["A", "B"]) diff --git a/pandas/tests/io/parser/test_c_parser_only.py b/pandas/tests/io/parser/test_c_parser_only.py index ae63b6af3a8b6..eee111dd4579c 100644 --- a/pandas/tests/io/parser/test_c_parser_only.py +++ b/pandas/tests/io/parser/test_c_parser_only.py @@ -13,6 +13,7 @@ import numpy as np import pytest +from pandas.compat import IS64 from pandas.errors import ParserError import pandas.util._test_decorators as td @@ -717,7 +718,10 @@ def test_float_precision_options(c_parser_only): df3 = parser.read_csv(StringIO(s), float_precision="legacy") - assert not df.iloc[0, 0] == df3.iloc[0, 0] + if IS64: + assert not df.iloc[0, 0] == df3.iloc[0, 0] + else: + assert df.iloc[0, 0] == df3.iloc[0, 0] msg = "Unrecognized float_precision option: junk" diff --git a/pandas/tests/reshape/test_pivot.py b/pandas/tests/reshape/test_pivot.py index 92128def4540a..642e6a691463e 100644 --- a/pandas/tests/reshape/test_pivot.py +++ b/pandas/tests/reshape/test_pivot.py @@ -4,6 +4,8 @@ import numpy as np import pytest +from pandas.compat import IS64 + import pandas as pd from pandas import ( Categorical, @@ -2104,6 +2106,7 @@ def test_pivot_duplicates(self): with pytest.raises(ValueError, match="duplicate entries"): data.pivot("a", "b", "c") + @pytest.mark.xfail(not IS64, reason="GH 36579: fail on 32-bit system") def test_pivot_empty(self): df = DataFrame(columns=["a", "b", "c"]) result = df.pivot("a", "b", "c")