Skip to content

CI: Xfail less on Python 3.10 #42524

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 1 commit into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
19 changes: 0 additions & 19 deletions pandas/tests/indexes/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

from pandas.compat import (
IS64,
PY310,
np_datetime64_compat,
)
from pandas.util._test_decorators import async_mark
Expand Down Expand Up @@ -1004,24 +1003,6 @@ def test_isin_nan_common_object(self, request, nulls_fixture, nulls_fixture2):
and math.isnan(nulls_fixture)
and math.isnan(nulls_fixture2)
):
if PY310:
if (
# Failing cases are
# np.nan, float('nan')
# float('nan'), np.nan
# float('nan'), float('nan')
# Since only float('nan'), np.nan is float
# Use not np.nan to identify float('nan')
nulls_fixture is np.nan
and nulls_fixture2 is not np.nan
or nulls_fixture is not np.nan
):
request.applymarker(
# This test is flaky :(
pytest.mark.xfail(
reason="Failing on Python 3.10 GH41940", strict=False
)
)
tm.assert_numpy_array_equal(
Index(["a", nulls_fixture]).isin([nulls_fixture2]),
np.array([False, True]),
Expand Down
5 changes: 0 additions & 5 deletions pandas/tests/reshape/test_get_dummies.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
import numpy as np
import pytest

from pandas.compat import PY310

from pandas.core.dtypes.common import is_integer_dtype

import pandas as pd
Expand Down Expand Up @@ -430,8 +428,6 @@ def test_dataframe_dummies_unicode(self, get_dummies_kwargs, expected):
result = get_dummies(**get_dummies_kwargs)
tm.assert_frame_equal(result, expected)

# This is flaky on Python 3.10
@pytest.mark.xfail(PY310, reason="Failing on Python 3.10 GH41940", strict=False)
def test_get_dummies_basic_drop_first(self, sparse):
# GH12402 Add a new parameter `drop_first` to avoid collinearity
# Basic case
Expand Down Expand Up @@ -471,7 +467,6 @@ def test_get_dummies_basic_drop_first_one_level(self, sparse):
result = get_dummies(s_series_index, drop_first=True, sparse=sparse)
tm.assert_frame_equal(result, expected)

@pytest.mark.xfail(PY310, reason="Failing on Python 3.10 GH41940", strict=False)
def test_get_dummies_basic_drop_first_NA(self, sparse):
# Test NA handling together with drop_first
s_NA = ["a", "b", np.nan]
Expand Down
11 changes: 1 addition & 10 deletions pandas/tests/test_algos.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
algos as libalgos,
hashtable as ht,
)
from pandas.compat import (
PY310,
np_array_datetime64_compat,
)
from pandas.compat import np_array_datetime64_compat
import pandas.util._test_decorators as td

from pandas.core.dtypes.common import (
Expand Down Expand Up @@ -786,8 +783,6 @@ def test_different_nans(self):
expected = np.array([np.nan])
tm.assert_numpy_array_equal(result, expected)

# Flaky on Python 3.10 -> Don't make strict
@pytest.mark.xfail(PY310, reason="Failing on Python 3.10 GH41940", strict=False)
def test_first_nan_kept(self):
# GH 22295
# create different nans from bit-patterns:
Expand Down Expand Up @@ -993,8 +988,6 @@ def __hash__(self):
# different objects -> False
tm.assert_numpy_array_equal(algos.isin([a], [b]), np.array([False]))

# Flaky on Python 3.10 -> Don't make strict
@pytest.mark.xfail(PY310, reason="Failing on Python 3.10 GH41940", strict=False)
def test_different_nans(self):
# GH 22160
# all nans are handled as equivalent
Expand Down Expand Up @@ -1037,8 +1030,6 @@ def test_empty(self, empty):
result = algos.isin(vals, empty)
tm.assert_numpy_array_equal(expected, result)

# Flaky on Python 3.10 -> Don't make strict
@pytest.mark.xfail(PY310, reason="Failing on Python 3.10 GH41940", strict=False)
def test_different_nan_objects(self):
# GH 22119
comps = np.array(["nan", np.nan * 1j, float("nan")], dtype=object)
Expand Down