Skip to content

Commit

Permalink
CI: docker 32-bit linux build #32709 (#35898)
Browse files Browse the repository at this point in the history
* CI: docker 32-bit linux build #32709

* fix manylinux version typo

* TST/CI: fix 32bit dtype tests #36579, #32709

* TST/CI: xfail 32-bit tests #36579, #32709

* CI: skip test #36579, #32709
  • Loading branch information
fangchenli committed Oct 28, 2020
1 parent 8501994 commit d89331b
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 6 deletions.
25 changes: 25 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
3 changes: 3 additions & 0 deletions pandas/tests/arrays/floating/test_function.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import numpy as np
import pytest

from pandas.compat import IS64

import pandas as pd
import pandas._testing as tm

Expand Down Expand Up @@ -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",
[
Expand Down
7 changes: 5 additions & 2 deletions pandas/tests/base/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -127,7 +127,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
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/groupby/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion pandas/tests/io/formats/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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"])
Expand Down
6 changes: 5 additions & 1 deletion pandas/tests/io/parser/test_c_parser_only.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"

Expand Down
3 changes: 3 additions & 0 deletions pandas/tests/reshape/test_pivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import numpy as np
import pytest

from pandas.compat import IS64

import pandas as pd
from pandas import (
Categorical,
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit d89331b

Please sign in to comment.