From cdcce75d7156603aa8dce659171f19813525f26b Mon Sep 17 00:00:00 2001 From: Joris Van den Bossche Date: Thu, 4 Mar 2021 08:40:44 +0100 Subject: [PATCH] TST: remove some no longer necessary ArrayManager skips for groupby --- pandas/tests/frame/methods/test_count.py | 3 --- pandas/tests/frame/methods/test_drop.py | 2 -- pandas/tests/frame/methods/test_reorder_levels.py | 3 --- pandas/tests/frame/methods/test_reset_index.py | 4 ---- pandas/tests/frame/methods/test_sort_index.py | 3 --- pandas/tests/groupby/aggregate/test_aggregate.py | 2 -- pandas/tests/groupby/transform/test_transform.py | 4 ---- pandas/tests/reshape/merge/test_join.py | 3 --- 8 files changed, 24 deletions(-) diff --git a/pandas/tests/frame/methods/test_count.py b/pandas/tests/frame/methods/test_count.py index 1dbcc36c83abc..4533e46a7aabd 100644 --- a/pandas/tests/frame/methods/test_count.py +++ b/pandas/tests/frame/methods/test_count.py @@ -1,8 +1,6 @@ import numpy as np import pytest -import pandas.util._test_decorators as td - from pandas import ( DataFrame, Index, @@ -109,7 +107,6 @@ def test_count_index_with_nan(self): ) tm.assert_frame_equal(res, expected) - @td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) groupby def test_count_level( self, multiindex_year_month_day_dataframe_random_data, diff --git a/pandas/tests/frame/methods/test_drop.py b/pandas/tests/frame/methods/test_drop.py index 84f5fa2021e2a..5d2aabd372fd1 100644 --- a/pandas/tests/frame/methods/test_drop.py +++ b/pandas/tests/frame/methods/test_drop.py @@ -4,7 +4,6 @@ import pytest from pandas.errors import PerformanceWarning -import pandas.util._test_decorators as td import pandas as pd from pandas import ( @@ -161,7 +160,6 @@ def test_drop(self): assert return_value is None tm.assert_frame_equal(df, expected) - @td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) groupby def test_drop_multiindex_not_lexsorted(self): # GH#11640 diff --git a/pandas/tests/frame/methods/test_reorder_levels.py b/pandas/tests/frame/methods/test_reorder_levels.py index 0173de88b6d6d..fd20c662229c1 100644 --- a/pandas/tests/frame/methods/test_reorder_levels.py +++ b/pandas/tests/frame/methods/test_reorder_levels.py @@ -1,8 +1,6 @@ import numpy as np import pytest -import pandas.util._test_decorators as td - from pandas import ( DataFrame, MultiIndex, @@ -52,7 +50,6 @@ def test_reorder_levels(self, frame_or_series): result = obj.reorder_levels(["L0", "L0", "L0"]) tm.assert_equal(result, expected) - @td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) groupby def test_reorder_levels_swaplevel_equivalence( self, multiindex_year_month_day_dataframe_random_data ): diff --git a/pandas/tests/frame/methods/test_reset_index.py b/pandas/tests/frame/methods/test_reset_index.py index bd66d54792fba..1374a3503ee11 100644 --- a/pandas/tests/frame/methods/test_reset_index.py +++ b/pandas/tests/frame/methods/test_reset_index.py @@ -4,8 +4,6 @@ import numpy as np import pytest -import pandas.util._test_decorators as td - from pandas.core.dtypes.common import ( is_float_dtype, is_integer_dtype, @@ -550,7 +548,6 @@ def test_reset_index_delevel_infer_dtype(self): assert is_integer_dtype(deleveled["prm1"]) assert is_float_dtype(deleveled["prm2"]) - @td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) groupby def test_reset_index_with_drop( self, multiindex_year_month_day_dataframe_random_data ): @@ -649,7 +646,6 @@ def test_reset_index_empty_frame_with_datetime64_multiindex(): tm.assert_frame_equal(result, expected) -@td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) groupby def test_reset_index_empty_frame_with_datetime64_multiindex_from_groupby(): # https://github.com/pandas-dev/pandas/issues/35657 df = DataFrame({"c1": [10.0], "c2": ["a"], "c3": pd.to_datetime("2020-01-01")}) diff --git a/pandas/tests/frame/methods/test_sort_index.py b/pandas/tests/frame/methods/test_sort_index.py index 5fa60b55f4e21..a04ed7e92478f 100644 --- a/pandas/tests/frame/methods/test_sort_index.py +++ b/pandas/tests/frame/methods/test_sort_index.py @@ -1,8 +1,6 @@ import numpy as np import pytest -import pandas.util._test_decorators as td - import pandas as pd from pandas import ( CategoricalDtype, @@ -373,7 +371,6 @@ def test_sort_index_multiindex(self, level): result = df.sort_index(level=level, sort_remaining=False) tm.assert_frame_equal(result, expected) - @td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) groupby def test_sort_index_intervalindex(self): # this is a de-facto sort via unstack # confirming that we sort in the order of the bins diff --git a/pandas/tests/groupby/aggregate/test_aggregate.py b/pandas/tests/groupby/aggregate/test_aggregate.py index ce75d37d2e776..8e6d67d03ae9d 100644 --- a/pandas/tests/groupby/aggregate/test_aggregate.py +++ b/pandas/tests/groupby/aggregate/test_aggregate.py @@ -136,7 +136,6 @@ def test_groupby_aggregation_multi_level_column(): tm.assert_frame_equal(result, expected) -@td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) non-cython agg def test_agg_apply_corner(ts, tsframe): # nothing to group, all NA grouped = ts.groupby(ts * np.nan) @@ -215,7 +214,6 @@ def test_aggregate_str_func(tsframe, groupbyfunc): tm.assert_frame_equal(result, expected) -@td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) non-cython agg def test_agg_str_with_kwarg_axis_1_raises(df, reduction_func): gb = df.groupby(level=0) if reduction_func in ("idxmax", "idxmin"): diff --git a/pandas/tests/groupby/transform/test_transform.py b/pandas/tests/groupby/transform/test_transform.py index c4621d5fc0f8c..9350a3fcd3036 100644 --- a/pandas/tests/groupby/transform/test_transform.py +++ b/pandas/tests/groupby/transform/test_transform.py @@ -4,8 +4,6 @@ import numpy as np import pytest -import pandas.util._test_decorators as td - from pandas.core.dtypes.common import ( ensure_platform_int, is_timedelta64_dtype, @@ -190,8 +188,6 @@ def test_transform_axis_1(request, transformation_func, using_array_manager): tm.assert_equal(result, expected) -# TODO(ArrayManager) groupby().transform returns DataFrame backed by BlockManager -@td.skip_array_manager_not_yet_implemented def test_transform_axis_ts(tsframe): # make sure that we are setting the axes diff --git a/pandas/tests/reshape/merge/test_join.py b/pandas/tests/reshape/merge/test_join.py index d31930aa233cd..fb161e38c7155 100644 --- a/pandas/tests/reshape/merge/test_join.py +++ b/pandas/tests/reshape/merge/test_join.py @@ -1,8 +1,6 @@ import numpy as np import pytest -import pandas.util._test_decorators as td - import pandas as pd from pandas import ( Categorical, @@ -553,7 +551,6 @@ def test_join_non_unique_period_index(self): ) tm.assert_frame_equal(result, expected) - @td.skip_array_manager_not_yet_implemented # TODO(ArrayManager) groupby def test_mixed_type_join_with_suffix(self): # GH #916 df = DataFrame(np.random.randn(20, 6), columns=["a", "b", "c", "d", "e", "f"])