Skip to content

Commit f9b6290

Browse files
authored
CI: azure timeouts (#43643)
1 parent fa6fffd commit f9b6290

File tree

4 files changed

+34
-23
lines changed

4 files changed

+34
-23
lines changed

pandas/tests/io/parser/common/test_index.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717

1818
xfail_pyarrow = pytest.mark.usefixtures("pyarrow_xfail")
1919

20+
# GH#43650: Some expected failures with the pyarrow engine can occasionally
21+
# cause a deadlock instead, so we skip these instead of xfailing
22+
skip_pyarrow = pytest.mark.usefixtures("pyarrow_skip")
23+
2024

2125
@pytest.mark.parametrize(
2226
"data,kwargs,expected",
@@ -271,7 +275,7 @@ def test_empty_with_index(all_parsers):
271275
tm.assert_frame_equal(result, expected)
272276

273277

274-
@xfail_pyarrow
278+
@skip_pyarrow
275279
def test_empty_with_multi_index(all_parsers):
276280
# see gh-10467
277281
data = "x,y,z"
@@ -284,7 +288,7 @@ def test_empty_with_multi_index(all_parsers):
284288
tm.assert_frame_equal(result, expected)
285289

286290

287-
@xfail_pyarrow
291+
@skip_pyarrow
288292
def test_empty_with_reversed_multi_index(all_parsers):
289293
data = "x,y,z"
290294
parser = all_parsers

pandas/tests/io/parser/common/test_ints.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
)
1414
import pandas._testing as tm
1515

16-
xfail_pyarrow = pytest.mark.usefixtures("pyarrow_xfail")
16+
# GH#43650: Some expected failures with the pyarrow engine can occasionally
17+
# cause a deadlock instead, so we skip these instead of xfailing
1718
skip_pyarrow = pytest.mark.usefixtures("pyarrow_skip")
1819

1920

@@ -119,7 +120,7 @@ def test_int64_min_issues(all_parsers):
119120
tm.assert_frame_equal(result, expected)
120121

121122

122-
@xfail_pyarrow
123+
@skip_pyarrow
123124
@pytest.mark.parametrize("conv", [None, np.int64, np.uint64])
124125
def test_int64_overflow(all_parsers, conv):
125126
data = """ID
@@ -163,7 +164,7 @@ def test_int64_overflow(all_parsers, conv):
163164
parser.read_csv(StringIO(data), converters={"ID": conv})
164165

165166

166-
@xfail_pyarrow
167+
@skip_pyarrow
167168
@pytest.mark.parametrize(
168169
"val", [np.iinfo(np.uint64).max, np.iinfo(np.int64).max, np.iinfo(np.int64).min]
169170
)
@@ -177,7 +178,7 @@ def test_int64_uint64_range(all_parsers, val):
177178
tm.assert_frame_equal(result, expected)
178179

179180

180-
@xfail_pyarrow
181+
@skip_pyarrow
181182
@pytest.mark.parametrize(
182183
"val", [np.iinfo(np.uint64).max + 1, np.iinfo(np.int64).min - 1]
183184
)
@@ -191,7 +192,7 @@ def test_outside_int64_uint64_range(all_parsers, val):
191192
tm.assert_frame_equal(result, expected)
192193

193194

194-
@xfail_pyarrow
195+
@skip_pyarrow
195196
@pytest.mark.parametrize("exp_data", [[str(-1), str(2 ** 63)], [str(2 ** 63), str(-1)]])
196197
def test_numeric_range_too_wide(all_parsers, exp_data):
197198
# No numerical dtype can hold both negative and uint64

pandas/tests/io/parser/conftest.py

+11-10
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ def csv1(datapath):
8282
return os.path.join(datapath("io", "data", "csv"), "test1.csv")
8383

8484

85-
_cParserHighMemory = CParserHighMemory()
86-
_cParserLowMemory = CParserLowMemory()
87-
_pythonParser = PythonParser()
88-
_pyarrowParser = PyArrowParser()
85+
_cParserHighMemory = CParserHighMemory
86+
_cParserLowMemory = CParserLowMemory
87+
_pythonParser = PythonParser
88+
_pyarrowParser = PyArrowParser
8989

9090
_py_parsers_only = [_pythonParser]
9191
_c_parsers_only = [_cParserHighMemory, _cParserLowMemory]
@@ -105,37 +105,38 @@ def all_parsers(request):
105105
"""
106106
Fixture all of the CSV parsers.
107107
"""
108-
if request.param.engine == "pyarrow":
108+
parser = request.param()
109+
if parser.engine == "pyarrow":
109110
pytest.importorskip("pyarrow", VERSIONS["pyarrow"])
110111
# Try setting num cpus to 1 to avoid hangs?
111112
import pyarrow
112113

113114
pyarrow.set_cpu_count(1)
114-
return request.param
115+
return parser
115116

116117

117118
@pytest.fixture(params=_c_parsers_only, ids=_c_parser_ids)
118119
def c_parser_only(request):
119120
"""
120121
Fixture all of the CSV parsers using the C engine.
121122
"""
122-
return request.param
123+
return request.param()
123124

124125

125126
@pytest.fixture(params=_py_parsers_only, ids=_py_parser_ids)
126127
def python_parser_only(request):
127128
"""
128129
Fixture all of the CSV parsers using the Python engine.
129130
"""
130-
return request.param
131+
return request.param()
131132

132133

133134
@pytest.fixture(params=_pyarrow_parsers_only, ids=_pyarrow_parsers_ids)
134135
def pyarrow_parser_only(request):
135136
"""
136137
Fixture all of the CSV parsers using the Pyarrow engine.
137138
"""
138-
return request.param
139+
return request.param()
139140

140141

141142
def _get_all_parser_float_precision_combinations():
@@ -147,7 +148,7 @@ def _get_all_parser_float_precision_combinations():
147148
ids = []
148149
for parser, parser_id in zip(_all_parsers, _all_parser_ids):
149150
for precision in parser.float_precision_choices:
150-
params.append((parser, precision))
151+
params.append((parser(), precision))
151152
ids.append(f"{parser_id}-{precision}")
152153

153154
return {"params": params, "ids": ids}

pandas/tests/io/parser/test_parse_dates.py

+11-6
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@
4444

4545
xfail_pyarrow = pytest.mark.usefixtures("pyarrow_xfail")
4646

47+
# GH#43650: Some expected failures with the pyarrow engine can occasionally
48+
# cause a deadlock instead, so we skip these instead of xfailing
49+
skip_pyarrow = pytest.mark.usefixtures("pyarrow_skip")
50+
4751
# constant
4852
_DEFAULT_DATETIME = datetime(1, 1, 1)
4953

@@ -1573,7 +1577,7 @@ def test_parse_timezone(all_parsers):
15731577
tm.assert_frame_equal(result, expected)
15741578

15751579

1576-
@xfail_pyarrow
1580+
@skip_pyarrow
15771581
@pytest.mark.parametrize(
15781582
"date_string",
15791583
["32/32/2019", "02/30/2019", "13/13/2019", "13/2019", "a3/11/2018", "10/11/2o17"],
@@ -1585,7 +1589,7 @@ def test_invalid_parse_delimited_date(all_parsers, date_string):
15851589
tm.assert_frame_equal(result, expected)
15861590

15871591

1588-
@xfail_pyarrow
1592+
@skip_pyarrow
15891593
@pytest.mark.parametrize(
15901594
"date_string,dayfirst,expected",
15911595
[
@@ -1608,7 +1612,7 @@ def test_parse_delimited_date_swap_no_warning(
16081612
tm.assert_frame_equal(result, expected)
16091613

16101614

1611-
@xfail_pyarrow
1615+
@skip_pyarrow
16121616
@pytest.mark.parametrize(
16131617
"date_string,dayfirst,expected",
16141618
[
@@ -1643,6 +1647,7 @@ def _helper_hypothesis_delimited_date(call, date_string, **kwargs):
16431647
return msg, result
16441648

16451649

1650+
@skip_pyarrow
16461651
@given(date_strategy)
16471652
@settings(deadline=None)
16481653
@pytest.mark.parametrize("delimiter", list(" -./"))
@@ -1678,7 +1683,7 @@ def test_hypothesis_delimited_date(date_format, dayfirst, delimiter, test_dateti
16781683
assert result == expected
16791684

16801685

1681-
@xfail_pyarrow
1686+
@skip_pyarrow
16821687
@pytest.mark.parametrize(
16831688
"names, usecols, parse_dates, missing_cols",
16841689
[
@@ -1711,7 +1716,7 @@ def test_missing_parse_dates_column_raises(
17111716
)
17121717

17131718

1714-
@xfail_pyarrow
1719+
@skip_pyarrow
17151720
def test_date_parser_and_names(all_parsers):
17161721
# GH#33699
17171722
parser = all_parsers
@@ -1721,7 +1726,7 @@ def test_date_parser_and_names(all_parsers):
17211726
tm.assert_frame_equal(result, expected)
17221727

17231728

1724-
@xfail_pyarrow
1729+
@skip_pyarrow
17251730
def test_date_parser_usecols_thousands(all_parsers):
17261731
# GH#39365
17271732
data = """A,B,C

0 commit comments

Comments
 (0)