Skip to content

Commit 5bb3ee7

Browse files
fangchenliukarroum
authored andcommitted
CI: docker 32-bit linux build pandas-dev#32709 (pandas-dev#35898)
* CI: docker 32-bit linux build pandas-dev#32709 * fix manylinux version typo * TST/CI: fix 32bit dtype tests pandas-dev#36579, pandas-dev#32709 * TST/CI: xfail 32-bit tests pandas-dev#36579, pandas-dev#32709 * CI: skip test pandas-dev#36579, pandas-dev#32709
1 parent 6b3c94a commit 5bb3ee7

File tree

7 files changed

+45
-6
lines changed

7 files changed

+45
-6
lines changed

azure-pipelines.yml

+25
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,28 @@ jobs:
2626
parameters:
2727
name: Windows
2828
vmImage: vs2017-win2016
29+
30+
- job: py37_32bit
31+
pool:
32+
vmImage: ubuntu-18.04
33+
34+
steps:
35+
- script: |
36+
docker pull quay.io/pypa/manylinux2014_i686
37+
docker run -v $(pwd):/pandas quay.io/pypa/manylinux2014_i686 \
38+
/bin/bash -xc "cd pandas && \
39+
/opt/python/cp37-cp37m/bin/python -m venv ~/virtualenvs/pandas-dev && \
40+
. ~/virtualenvs/pandas-dev/bin/activate && \
41+
python -m pip install --no-deps -U pip wheel setuptools && \
42+
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
43+
python setup.py build_ext -q -i -j2 && \
44+
python -m pip install --no-build-isolation -e . && \
45+
pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"
46+
displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'
47+
48+
- task: PublishTestResults@2
49+
condition: succeededOrFailed()
50+
inputs:
51+
testResultsFiles: '**/test-*.xml'
52+
failTaskOnFailedTests: true
53+
testRunTitle: 'Publish test results for Python 3.7-32 bit full Linux'

pandas/tests/arrays/floating/test_function.py

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import numpy as np
22
import pytest
33

4+
from pandas.compat import IS64
5+
46
import pandas as pd
57
import pandas._testing as tm
68

@@ -71,6 +73,7 @@ def test_ufunc_reduce_raises(values):
7173
np.add.reduce(a)
7274

7375

76+
@pytest.mark.skipif(not IS64, reason="GH 36579: fail on 32-bit system")
7477
@pytest.mark.parametrize(
7578
"pandasmethname, kwargs",
7679
[

pandas/tests/base/test_misc.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import numpy as np
44
import pytest
55

6-
from pandas.compat import PYPY
6+
from pandas.compat import IS64, PYPY
77

88
from pandas.core.dtypes.common import (
99
is_categorical_dtype,
@@ -127,7 +127,10 @@ def test_memory_usage(index_or_series_obj):
127127
)
128128

129129
if len(obj) == 0:
130-
expected = 0 if isinstance(obj, Index) else 80
130+
if isinstance(obj, Index):
131+
expected = 0
132+
else:
133+
expected = 80 if IS64 else 48
131134
assert res_deep == res == expected
132135
elif is_object or is_categorical:
133136
# only deep will pick them up

pandas/tests/groupby/test_groupby.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1268,8 +1268,8 @@ def test_groupby_nat_exclude():
12681268
assert grouped.ngroups == 2
12691269

12701270
expected = {
1271-
Timestamp("2013-01-01 00:00:00"): np.array([1, 7], dtype=np.int64),
1272-
Timestamp("2013-02-01 00:00:00"): np.array([3, 5], dtype=np.int64),
1271+
Timestamp("2013-01-01 00:00:00"): np.array([1, 7], dtype=np.intp),
1272+
Timestamp("2013-02-01 00:00:00"): np.array([3, 5], dtype=np.intp),
12731273
}
12741274

12751275
for k in grouped.indices:

pandas/tests/io/formats/test_info.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy as np
88
import pytest
99

10-
from pandas.compat import PYPY
10+
from pandas.compat import IS64, PYPY
1111

1212
from pandas import (
1313
CategoricalIndex,
@@ -475,6 +475,7 @@ def test_info_categorical():
475475
df.info(buf=buf)
476476

477477

478+
@pytest.mark.xfail(not IS64, reason="GH 36579: fail on 32-bit system")
478479
def test_info_int_columns():
479480
# GH#37245
480481
df = DataFrame({1: [1, 2], 2: [2, 3]}, index=["A", "B"])

pandas/tests/io/parser/test_c_parser_only.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import numpy as np
1414
import pytest
1515

16+
from pandas.compat import IS64
1617
from pandas.errors import ParserError
1718
import pandas.util._test_decorators as td
1819

@@ -717,7 +718,10 @@ def test_float_precision_options(c_parser_only):
717718

718719
df3 = parser.read_csv(StringIO(s), float_precision="legacy")
719720

720-
assert not df.iloc[0, 0] == df3.iloc[0, 0]
721+
if IS64:
722+
assert not df.iloc[0, 0] == df3.iloc[0, 0]
723+
else:
724+
assert df.iloc[0, 0] == df3.iloc[0, 0]
721725

722726
msg = "Unrecognized float_precision option: junk"
723727

pandas/tests/reshape/test_pivot.py

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import numpy as np
55
import pytest
66

7+
from pandas.compat import IS64
8+
79
import pandas as pd
810
from pandas import (
911
Categorical,
@@ -2104,6 +2106,7 @@ def test_pivot_duplicates(self):
21042106
with pytest.raises(ValueError, match="duplicate entries"):
21052107
data.pivot("a", "b", "c")
21062108

2109+
@pytest.mark.xfail(not IS64, reason="GH 36579: fail on 32-bit system")
21072110
def test_pivot_empty(self):
21082111
df = DataFrame(columns=["a", "b", "c"])
21092112
result = df.pivot("a", "b", "c")

0 commit comments

Comments
 (0)