diff --git a/pandas/tests/indexes/test_base.py b/pandas/tests/indexes/test_base.py index af781f0b58f85..826649358e663 100644 --- a/pandas/tests/indexes/test_base.py +++ b/pandas/tests/indexes/test_base.py @@ -12,7 +12,6 @@ from pandas.compat import ( IS64, - PY310, np_datetime64_compat, ) from pandas.util._test_decorators import async_mark @@ -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]), diff --git a/pandas/tests/reshape/test_get_dummies.py b/pandas/tests/reshape/test_get_dummies.py index d33721c796efa..653ea88ed62ac 100644 --- a/pandas/tests/reshape/test_get_dummies.py +++ b/pandas/tests/reshape/test_get_dummies.py @@ -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 @@ -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 @@ -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] diff --git a/pandas/tests/test_algos.py b/pandas/tests/test_algos.py index 490052c793fdc..4df95d895e475 100644 --- a/pandas/tests/test_algos.py +++ b/pandas/tests/test_algos.py @@ -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 ( @@ -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: @@ -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 @@ -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)