Skip to content

WIP/TST: troubleshoot xfails #44429

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

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
625f081
TST: troubleshoot xfails
jbrockmendel Nov 13, 2021
5131837
remove warning ignore
jbrockmendel Nov 13, 2021
780051e
Merge branch 'master' into xfails
jbrockmendel Nov 13, 2021
8c57a10
Merge branch 'master' into xfails
jbrockmendel Nov 14, 2021
90e4ce4
re-xfail
jbrockmendel Nov 14, 2021
208a4d9
Merge branch 'master' into xfails
jbrockmendel Nov 15, 2021
4988ce6
restore xfail
jbrockmendel Nov 15, 2021
531de69
Troubleshoot windows timeouts
jbrockmendel Nov 15, 2021
11ce3e1
force cI
jbrockmendel Nov 15, 2021
1d90c72
add pytest-timeout to all builds
jbrockmendel Nov 15, 2021
f38b0a0
add to deps
jbrockmendel Nov 15, 2021
727d039
check file leaks
jbrockmendel Nov 15, 2021
59b1f33
Merge branch 'master' into xfails
jbrockmendel Nov 16, 2021
d5fe414
tigher xfail for pytz 2017.3
jbrockmendel Nov 16, 2021
d10c30d
Merge branch 'master' into xfails
jbrockmendel Nov 17, 2021
03d8325
xfail later pytz
jbrockmendel Nov 17, 2021
369ab99
Merge branch 'master' into tst-timeout
jbrockmendel Nov 18, 2021
66f69c7
Merge branch 'master' into tst-timeout
jbrockmendel Nov 19, 2021
f46aa66
missing dep
jbrockmendel Nov 19, 2021
621eb07
Merge branch 'master' into xfails
jbrockmendel Nov 19, 2021
f1b6c5f
check_dtype
jbrockmendel Nov 20, 2021
58f26b4
Merge branch 'master' into xfails
jbrockmendel Nov 20, 2021
f03c38d
Merge branch 'master' of https://github.com/pandas-dev/pandas into xf…
jbrockmendel Nov 21, 2021
f817d2d
re-xfail
jbrockmendel Nov 21, 2021
c709573
Merge branch 'master' into tst-timeout
jbrockmendel Nov 21, 2021
16eb89d
Merge branch 'master' into tst-timeout
jbrockmendel Nov 22, 2021
16405cf
Merge branch 'master' into xfails
jbrockmendel Nov 22, 2021
dd68841
Merge branch 'master' into xfails
jbrockmendel Nov 23, 2021
56c2cf0
Merge branch 'tst-timeout' into xfails
jbrockmendel Nov 23, 2021
8c10450
try to narrow down xfail
jbrockmendel Nov 23, 2021
a52a48e
Merge branch 'master' into xfails
jbrockmendel Nov 23, 2021
a67a141
Merge branch 'master' into xfails
jbrockmendel Nov 24, 2021
5e73a81
Merge branch 'master' into xfails
jbrockmendel Nov 25, 2021
5a4e682
troubleshoot
jbrockmendel Nov 25, 2021
7a190d6
Merge branch 'master' into xfails
jbrockmendel Nov 26, 2021
1665646
Merge branch 'master' into xfails
jbrockmendel Nov 27, 2021
752b2d0
troubleshoot win32 hacks
jbrockmendel Nov 27, 2021
5b16fe1
Merge branch 'master' into xfails
jbrockmendel Nov 28, 2021
fb5ee0f
Merge branch 'master' into xfails
jbrockmendel Nov 28, 2021
59975d4
keep trying
jbrockmendel Nov 28, 2021
18c88fe
Merge branch 'master' into xfails
jbrockmendel Dec 1, 2021
53809f6
Merge branch 'master' into xfails
jbrockmendel Dec 1, 2021
388ecb0
Merge branch 'master' into xfails
jbrockmendel Dec 2, 2021
ed66b04
Merge branch 'master' into xfails
jbrockmendel Dec 3, 2021
d64c4d4
troubleshoot more
jbrockmendel Dec 3, 2021
e56aab1
Merge branch 'master' into xfails
jbrockmendel Dec 4, 2021
147ae13
Merge branch 'master' into xfails
jbrockmendel Dec 6, 2021
18ca101
Merge branch 'master' into xfails
jbrockmendel Dec 7, 2021
4ba64d2
troubleshoot
jbrockmendel Dec 7, 2021
a34b042
not callable
jbrockmendel Dec 7, 2021
974eadd
hope against hope
jbrockmendel Dec 7, 2021
8c9191b
Merge branch 'master' into xfails
jbrockmendel Dec 7, 2021
e6a1ab6
update helper
jbrockmendel Dec 7, 2021
a283de0
Merge branch 'master' into xfails
jbrockmendel Dec 8, 2021
50e3540
Merge branch 'master' into xfails
jbrockmendel Dec 8, 2021
b1485d6
post-rebase fixup
jbrockmendel Dec 8, 2021
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
1 change: 0 additions & 1 deletion pandas/tests/generic/test_duplicate_labels.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def test_preserve_getitem(self):
assert df.loc[[0]].flags.allows_duplicate_labels is False
assert df.loc[0, ["A"]].flags.allows_duplicate_labels is False

@pytest.mark.xfail(reason="Unclear behavior.")
def test_ndframe_getitem_caching_issue(self):
# NDFrame.__getitem__ will cache the first df['A']. May need to
# invalidate that cache? Update the cached entries?
Expand Down
4 changes: 0 additions & 4 deletions pandas/tests/indexes/datetimes/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -653,10 +653,6 @@ def test_get_indexer_mixed_dtypes(self, target):
([date(9999, 1, 1), date(9999, 1, 1)], [-1, -1]),
],
)
# FIXME: these warnings are flaky GH#36131
@pytest.mark.filterwarnings(
"ignore:Comparison of Timestamp with datetime.date:FutureWarning"
)
def test_get_indexer_out_of_bounds_date(self, target, positions):
values = DatetimeIndex([Timestamp("2020-01-01"), Timestamp("2020-01-02")])

Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/io/json/test_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -1741,11 +1741,6 @@ def test_json_multiindex(self, dataframe, expected):
result = series.to_json(orient="index")
assert result == expected

@pytest.mark.xfail(
is_platform_windows(),
reason="localhost connection rejected",
strict=False,
)
def test_to_s3(self, s3_resource, s3so):
import time

Expand Down
23 changes: 3 additions & 20 deletions pandas/tests/io/parser/common/test_chunksize.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ def test_chunk_begins_with_newline_whitespace(all_parsers):


@pytest.mark.slow
@pytest.mark.xfail(reason="GH38630, sometimes gives ResourceWarning", strict=False)
def test_chunks_have_consistent_numerical_type(all_parsers):
parser = all_parsers
integers = [str(i) for i in range(499999)]
Expand All @@ -176,7 +175,7 @@ def test_chunks_have_consistent_numerical_type(all_parsers):
assert result.a.dtype == float


def test_warn_if_chunks_have_mismatched_type(all_parsers, request):
def test_warn_if_chunks_have_mismatched_type(all_parsers):
warning_type = None
parser = all_parsers
size = 10000
Expand All @@ -193,24 +192,8 @@ def test_warn_if_chunks_have_mismatched_type(all_parsers, request):

buf = StringIO(data)

try:
with tm.assert_produces_warning(warning_type):
df = parser.read_csv(buf)
except AssertionError as err:
# 2021-02-21 this occasionally fails on the CI with an unexpected
# ResourceWarning that we have been unable to track down,
# see GH#38630
if "ResourceWarning" not in str(err) or parser.engine != "python":
raise

# Check the main assertion of the test before re-raising
assert df.a.dtype == object

mark = pytest.mark.xfail(
reason="ResourceWarning for unclosed SSL Socket, GH#38630"
)
request.node.add_marker(mark)
raise
with tm.assert_produces_warning(warning_type):
df = parser.read_csv(buf)

assert df.a.dtype == object

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/parser/test_compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def test_zip_error_invalid_zip(parser_and_data):

@skip_pyarrow
@pytest.mark.parametrize("filename", [None, "test.{ext}"])
def test_compression(parser_and_data, compression_only, buffer, filename):
def test_compression(parser_and_data, compression_only, buffer, filename, request):
parser, data, expected = parser_and_data
compress_type = compression_only

Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/io/parser/test_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ def test_read_s3_fails(self, s3so):
with pytest.raises(OSError, match=msg):
read_csv("s3://cant_get_it/file.csv")

@pytest.mark.xfail(reason="GH#39155 s3fs upgrade", strict=False)
def test_write_s3_csv_fails(self, tips_df, s3so):
# GH 32486
# Attempting to write to an invalid S3 path should raise
Expand All @@ -228,7 +227,6 @@ def test_write_s3_csv_fails(self, tips_df, s3so):
"s3://an_s3_bucket_data_doesnt_exit/not_real.csv", storage_options=s3so
)

@pytest.mark.xfail(reason="GH#39155 s3fs upgrade", strict=False)
@td.skip_if_no("pyarrow")
def test_write_s3_parquet_fails(self, tips_df, s3so):
# GH 27679
Expand Down
13 changes: 3 additions & 10 deletions pandas/tests/io/pytables/test_append.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,8 +581,7 @@ def check_col(key, name, size):
& (df_new.A > 0)
& (df_new.B < 0)
]
tm.assert_frame_equal(result, expected, check_freq=False)
# FIXME: 2020-05-07 freq check randomly fails in the CI
tm.assert_frame_equal(result, expected)

# yield an empty frame
result = store.select("df", "string='foo' and string2='cool'")
Expand Down Expand Up @@ -611,9 +610,7 @@ def check_col(key, name, size):

result = store.select("df_dc", ["B > 0", "C > 0", "string == foo"])
expected = df_dc[(df_dc.B > 0) & (df_dc.C > 0) & (df_dc.string == "foo")]
tm.assert_frame_equal(result, expected, check_freq=False)
# FIXME: 2020-12-07 intermittent build failures here with freq of
# None instead of BDay(4)
tm.assert_frame_equal(result, expected)

with ensure_clean_store(setup_path) as store:
# doc example part 2
Expand Down Expand Up @@ -896,9 +893,6 @@ def test_append_to_multiple_dropna(setup_path):
tm.assert_index_equal(store.select("df1").index, store.select("df2").index)


@pytest.mark.xfail(
run=False, reason="append_to_multiple_dropna_false is not raising as failed"
)
def test_append_to_multiple_dropna_false(setup_path):
df1 = tm.makeTimeDataFrame()
df2 = tm.makeTimeDataFrame().rename(columns="{}_2".format)
Expand All @@ -912,8 +906,7 @@ def test_append_to_multiple_dropna_false(setup_path):
{"df1a": ["A", "B"], "df2a": None}, df, selector="df1a", dropna=False
)

# TODO Update error message to desired message for this case
msg = "Cannot select as multiple after appending with dropna=False"
msg = "all tables must have exactly the same nrows!"
with pytest.raises(ValueError, match=msg):
store.select_as_multiple(["df1a", "df2a"])

Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/io/pytables/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -838,8 +838,7 @@ def test_select_as_multiple(setup_path):
)
expected = concat([df1, df2], axis=1)
expected = expected[(expected.A > 0) & (expected.B > 0)]
tm.assert_frame_equal(result, expected, check_freq=False)
# FIXME: 2021-01-20 this is failing with freq None vs 4B on some builds
tm.assert_frame_equal(result, expected)

# multiple (diff selector)
result = store.select_as_multiple(
Expand Down
4 changes: 1 addition & 3 deletions pandas/tests/io/pytables/test_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,7 @@ def test_coordinates(setup_path):

expected = concat([df1, df2], axis=1)
expected = expected[(expected.A > 0) & (expected.B > 0)]
tm.assert_frame_equal(result, expected, check_freq=False)
# FIXME: 2021-01-18 on some (mostly windows) builds we get freq=None
# but expect freq="18B"
tm.assert_frame_equal(result, expected)

# pass array/mask as the coordinates
with ensure_clean_store(setup_path) as store:
Expand Down
6 changes: 0 additions & 6 deletions pandas/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

from pandas._config import get_option

from pandas.compat import is_platform_windows
from pandas.compat.pyarrow import (
pa_version_under1p0,
pa_version_under2p0,
Expand Down Expand Up @@ -735,11 +734,6 @@ def test_categorical(self, pa):

check_round_trip(df, pa)

@pytest.mark.xfail(
is_platform_windows(),
reason="localhost connection rejected",
strict=False,
)
def test_s3_roundtrip_explicit_fs(self, df_compat, s3_resource, pa, s3so):
s3fs = pytest.importorskip("s3fs")
s3 = s3fs.S3FileSystem(**s3so)
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/plotting/frame/test_frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,11 +494,6 @@ def test_line_lim(self):
assert xmin <= lines[0].get_data()[0][0]
assert xmax >= lines[0].get_data()[0][-1]

@pytest.mark.xfail(
strict=False,
reason="2020-12-01 this has been failing periodically on the "
"ymin==0 assertion for a week or so.",
)
@pytest.mark.parametrize("stacked", [True, False])
def test_area_lim(self, stacked):
df = DataFrame(np.random.rand(6, 4), columns=["x", "y", "z", "four"])
Expand Down
10 changes: 1 addition & 9 deletions pandas/tests/plotting/test_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@

import pandas._config.config as cf

from pandas.compat import (
is_platform_windows,
np_datetime64_compat,
)
from pandas.compat import np_datetime64_compat
import pandas.util._test_decorators as td

from pandas import (
Expand Down Expand Up @@ -92,11 +89,6 @@ def test_registering_no_warning(self):
ax.plot(s.index, s.values)
plt.close()

@pytest.mark.xfail(
is_platform_windows(),
reason="Getting two warnings intermittently, see GH#37746",
strict=False,
)
def test_pandas_plots_register(self):
plt = pytest.importorskip("matplotlib.pyplot")
s = Series(range(12), index=date_range("2017", periods=12))
Expand Down
6 changes: 0 additions & 6 deletions pandas/tests/plotting/test_groupby.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import numpy as np
import pytest

from pandas.compat import is_platform_windows
import pandas.util._test_decorators as td

from pandas import (
Expand All @@ -20,11 +19,6 @@

@td.skip_if_no_mpl
class TestDataFrameGroupByPlots(TestPlotBase):
@pytest.mark.xfail(
is_platform_windows(),
reason="Looks like LinePlot._is_ts_plot is wrong",
strict=False,
)
def test_series_groupby_plotting_nominally_works(self):
n = 10
weight = Series(np.random.normal(166, 20, size=n))
Expand Down
3 changes: 0 additions & 3 deletions pandas/tests/tseries/offsets/test_dst.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ def test_all_offset_classes(self, tup):
assert first == second


@pytest.mark.xfail(
strict=False, reason="'Africa/Kinshasa' test case fails under pytz=2017.3"
)
@pytest.mark.parametrize(
"original_dt, target_dt, offset, tz",
[
Expand Down
2 changes: 0 additions & 2 deletions pandas/tests/tseries/offsets/test_offsets_properties.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
given,
strategies as st,
)
from hypothesis.errors import Flaky
from hypothesis.extra.dateutil import timezones as dateutil_timezones
from hypothesis.extra.pytz import timezones as pytz_timezones
import pytest
Expand Down Expand Up @@ -111,7 +110,6 @@ def test_on_offset_implementations(dt, offset):
assert offset.is_on_offset(dt) == (compare == dt)


@pytest.mark.xfail(strict=False, raises=Flaky, reason="unreliable test timings")
@given(gen_yqm_offset)
def test_shift_across_dst(offset):
# GH#18319 check that 1) timezone is correctly normalized and
Expand Down
1 change: 0 additions & 1 deletion pandas/tests/window/test_rolling.py
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,6 @@ def test_rolling_quantile_np_percentile():
tm.assert_almost_equal(df_quantile.values, np.array(np_percentile))


@pytest.mark.xfail(reason="GH#44343", strict=False)
@pytest.mark.parametrize("quantile", [0.0, 0.1, 0.45, 0.5, 1])
@pytest.mark.parametrize(
"interpolation", ["linear", "lower", "higher", "nearest", "midpoint"]
Expand Down