Skip to content

Commit f45cc0c

Browse files
mroeschkesimonjayhawkins
authored andcommitted
CI: Debug Windows stack overflow (pandas-dev#46358)
* CI: Debug Windows stack overflow * Set recursion limit for some tests * Remove pytest azurepipelines causing issues with 32 bit build? * Remove -v * Debug again * Fix invocation * TestReduceBoolean causing this? * Remove -v
1 parent eb27f7b commit f45cc0c

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
/opt/python/cp38-cp38/bin/python -m venv ~/virtualenvs/pandas-dev && \
4646
. ~/virtualenvs/pandas-dev/bin/activate && \
4747
python -m pip install --no-deps -U pip wheel 'setuptools<60.0.0' && \
48-
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis pytest-azurepipelines && \
48+
pip install cython numpy python-dateutil pytz pytest pytest-xdist hypothesis && \
4949
python setup.py build_ext -q -j2 && \
5050
python -m pip install --no-build-isolation -e . && \
5151
pytest -m 'not slow and not network and not clipboard' pandas --junitxml=test-data.xml"

pandas/tests/extension/arrow/test_bool.py

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

4+
from pandas.compat import (
5+
is_ci_environment,
6+
is_platform_windows,
7+
)
8+
49
import pandas as pd
510
import pandas._testing as tm
611
from pandas.api.types import is_bool_dtype
@@ -91,6 +96,10 @@ def test_reduce_series_boolean(self):
9196
pass
9297

9398

99+
@pytest.mark.skipif(
100+
is_ci_environment() and is_platform_windows(),
101+
reason="Causes stack overflow on Windows CI",
102+
)
94103
class TestReduceBoolean(base.BaseBooleanReduceTests):
95104
pass
96105

pandas/tests/extension/json/test_json.py

+15-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import collections
22
import operator
3+
import sys
34

45
import pytest
56

@@ -163,12 +164,24 @@ def test_from_dtype(self, data):
163164
@pytest.mark.xfail(reason="RecursionError, GH-33900")
164165
def test_series_constructor_no_data_with_index(self, dtype, na_value):
165166
# RecursionError: maximum recursion depth exceeded in comparison
166-
super().test_series_constructor_no_data_with_index(dtype, na_value)
167+
rec_limit = sys.getrecursionlimit()
168+
try:
169+
# Limit to avoid stack overflow on Windows CI
170+
sys.setrecursionlimit(100)
171+
super().test_series_constructor_no_data_with_index(dtype, na_value)
172+
finally:
173+
sys.setrecursionlimit(rec_limit)
167174

168175
@pytest.mark.xfail(reason="RecursionError, GH-33900")
169176
def test_series_constructor_scalar_na_with_index(self, dtype, na_value):
170177
# RecursionError: maximum recursion depth exceeded in comparison
171-
super().test_series_constructor_scalar_na_with_index(dtype, na_value)
178+
rec_limit = sys.getrecursionlimit()
179+
try:
180+
# Limit to avoid stack overflow on Windows CI
181+
sys.setrecursionlimit(100)
182+
super().test_series_constructor_scalar_na_with_index(dtype, na_value)
183+
finally:
184+
sys.setrecursionlimit(rec_limit)
172185

173186
@pytest.mark.xfail(reason="collection as scalar, GH-33901")
174187
def test_series_constructor_scalar_with_index(self, data, dtype):

0 commit comments

Comments
 (0)