Skip to content

CI: azure timeouts #43643

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Sep 21, 2021
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pandas/tests/io/parser/common/test_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import pandas._testing as tm

xfail_pyarrow = pytest.mark.usefixtures("pyarrow_xfail")
skip_pyarrow = pytest.mark.usefixtures("pyarrow_skip")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you add some comments here on when to xfail vs skip

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, will do



@pytest.mark.parametrize(
Expand Down Expand Up @@ -271,7 +272,7 @@ def test_empty_with_index(all_parsers):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
def test_empty_with_multi_index(all_parsers):
# see gh-10467
data = "x,y,z"
Expand All @@ -284,7 +285,7 @@ def test_empty_with_multi_index(all_parsers):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
def test_empty_with_reversed_multi_index(all_parsers):
data = "x,y,z"
parser = all_parsers
Expand Down
9 changes: 4 additions & 5 deletions pandas/tests/io/parser/common/test_ints.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
)
import pandas._testing as tm

xfail_pyarrow = pytest.mark.usefixtures("pyarrow_xfail")
skip_pyarrow = pytest.mark.usefixtures("pyarrow_skip")


Expand Down Expand Up @@ -119,7 +118,7 @@ def test_int64_min_issues(all_parsers):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
@pytest.mark.parametrize("conv", [None, np.int64, np.uint64])
def test_int64_overflow(all_parsers, conv):
data = """ID
Expand Down Expand Up @@ -163,7 +162,7 @@ def test_int64_overflow(all_parsers, conv):
parser.read_csv(StringIO(data), converters={"ID": conv})


@xfail_pyarrow
@skip_pyarrow
@pytest.mark.parametrize(
"val", [np.iinfo(np.uint64).max, np.iinfo(np.int64).max, np.iinfo(np.int64).min]
)
Expand All @@ -177,7 +176,7 @@ def test_int64_uint64_range(all_parsers, val):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
@pytest.mark.parametrize(
"val", [np.iinfo(np.uint64).max + 1, np.iinfo(np.int64).min - 1]
)
Expand All @@ -191,7 +190,7 @@ def test_outside_int64_uint64_range(all_parsers, val):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
@pytest.mark.parametrize("exp_data", [[str(-1), str(2 ** 63)], [str(2 ** 63), str(-1)]])
def test_numeric_range_too_wide(all_parsers, exp_data):
# No numerical dtype can hold both negative and uint64
Expand Down
21 changes: 11 additions & 10 deletions pandas/tests/io/parser/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ def csv1(datapath):
return os.path.join(datapath("io", "data", "csv"), "test1.csv")


_cParserHighMemory = CParserHighMemory()
_cParserLowMemory = CParserLowMemory()
_pythonParser = PythonParser()
_pyarrowParser = PyArrowParser()
_cParserHighMemory = CParserHighMemory
_cParserLowMemory = CParserLowMemory
_pythonParser = PythonParser
_pyarrowParser = PyArrowParser

_py_parsers_only = [_pythonParser]
_c_parsers_only = [_cParserHighMemory, _cParserLowMemory]
Expand All @@ -105,37 +105,38 @@ def all_parsers(request):
"""
Fixture all of the CSV parsers.
"""
if request.param.engine == "pyarrow":
parser = request.param()
if parser.engine == "pyarrow":
pytest.importorskip("pyarrow", VERSIONS["pyarrow"])
# Try setting num cpus to 1 to avoid hangs?
import pyarrow

pyarrow.set_cpu_count(1)
return request.param
return parser


@pytest.fixture(params=_c_parsers_only, ids=_c_parser_ids)
def c_parser_only(request):
"""
Fixture all of the CSV parsers using the C engine.
"""
return request.param
return request.param()


@pytest.fixture(params=_py_parsers_only, ids=_py_parser_ids)
def python_parser_only(request):
"""
Fixture all of the CSV parsers using the Python engine.
"""
return request.param
return request.param()


@pytest.fixture(params=_pyarrow_parsers_only, ids=_pyarrow_parsers_ids)
def pyarrow_parser_only(request):
"""
Fixture all of the CSV parsers using the Pyarrow engine.
"""
return request.param
return request.param()


def _get_all_parser_float_precision_combinations():
Expand All @@ -147,7 +148,7 @@ def _get_all_parser_float_precision_combinations():
ids = []
for parser, parser_id in zip(_all_parsers, _all_parser_ids):
for precision in parser.float_precision_choices:
params.append((parser, precision))
params.append((parser(), precision))
ids.append(f"{parser_id}-{precision}")

return {"params": params, "ids": ids}
Expand Down
15 changes: 9 additions & 6 deletions pandas/tests/io/parser/test_parse_dates.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from pandas.io.parsers import read_csv

xfail_pyarrow = pytest.mark.usefixtures("pyarrow_xfail")
skip_pyarrow = pytest.mark.usefixtures("pyarrow_skip")

# constant
_DEFAULT_DATETIME = datetime(1, 1, 1)
Expand Down Expand Up @@ -1573,7 +1574,7 @@ def test_parse_timezone(all_parsers):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
@pytest.mark.parametrize(
"date_string",
["32/32/2019", "02/30/2019", "13/13/2019", "13/2019", "a3/11/2018", "10/11/2o17"],
Expand All @@ -1585,7 +1586,7 @@ def test_invalid_parse_delimited_date(all_parsers, date_string):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
@pytest.mark.parametrize(
"date_string,dayfirst,expected",
[
Expand All @@ -1608,7 +1609,7 @@ def test_parse_delimited_date_swap_no_warning(
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
@pytest.mark.parametrize(
"date_string,dayfirst,expected",
[
Expand Down Expand Up @@ -1643,6 +1644,8 @@ def _helper_hypothesis_delimited_date(call, date_string, **kwargs):
return msg, result


@pytest.mark.slow
@skip_pyarrow
@given(date_strategy)
@settings(deadline=None)
@pytest.mark.parametrize("delimiter", list(" -./"))
Expand Down Expand Up @@ -1678,7 +1681,7 @@ def test_hypothesis_delimited_date(date_format, dayfirst, delimiter, test_dateti
assert result == expected


@xfail_pyarrow
@skip_pyarrow
@pytest.mark.parametrize(
"names, usecols, parse_dates, missing_cols",
[
Expand Down Expand Up @@ -1711,7 +1714,7 @@ def test_missing_parse_dates_column_raises(
)


@xfail_pyarrow
@skip_pyarrow
def test_date_parser_and_names(all_parsers):
# GH#33699
parser = all_parsers
Expand All @@ -1721,7 +1724,7 @@ def test_date_parser_and_names(all_parsers):
tm.assert_frame_equal(result, expected)


@xfail_pyarrow
@skip_pyarrow
def test_date_parser_usecols_thousands(all_parsers):
# GH#39365
data = """A,B,C
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/tseries/offsets/test_offsets_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
# Offset-specific behaviour tests


@pytest.mark.arm_slow
@pytest.mark.slow
@given(gen_random_datetime, gen_yqm_offset)
def test_on_offset_implementations(dt, offset):
assume(not offset.normalize)
Expand Down
3 changes: 2 additions & 1 deletion pandas/tests/tseries/offsets/test_ticks.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def test_delta_to_tick():
assert tick == Nano(5)


@pytest.mark.slow
@pytest.mark.parametrize("cls", tick_classes)
@settings(deadline=None) # GH 24641
@example(n=2, m=3)
Expand All @@ -82,7 +83,7 @@ def test_tick_add_sub(cls, n, m):
assert left - right == expected


@pytest.mark.arm_slow
@pytest.mark.slow
@pytest.mark.parametrize("cls", tick_classes)
@settings(deadline=None)
@example(n=2, m=3)
Expand Down
1 change: 1 addition & 0 deletions pandas/tests/tslibs/test_ccalendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def test_dt_correct_iso_8601_year_week_and_day(input_date_tuple, expected_iso_tu
assert result == expected_iso_tuple


@pytest.mark.slow
@given(
st.datetimes(
min_value=pd.Timestamp.min.to_pydatetime(warn=False),
Expand Down