Skip to content

Commit

Permalink
Remove other tests
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl committed Feb 4, 2024
1 parent 9e421e3 commit 0e7b451
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions pandas/tests/generic/test_finalize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import pytest

import pandas as pd
import pandas._testing as tm

# TODO:
# * Binary methods (mul, div, etc.)
Expand Down Expand Up @@ -303,16 +302,6 @@
({"A": [1, 1, 1, 1]}, pd.date_range("2000", periods=4)),
operator.methodcaller("between_time", "12:00", "13:00"),
),
(
pd.Series,
(1, pd.date_range("2000", periods=4)),
operator.methodcaller("last", "3D"),
),
(
pd.DataFrame,
({"A": [1, 1, 1, 1]}, pd.date_range("2000", periods=4)),
operator.methodcaller("last", "3D"),
),
(pd.Series, ([1, 2],), operator.methodcaller("rank")),
(pd.DataFrame, frame_data, operator.methodcaller("rank")),
(pd.Series, ([1, 2],), operator.methodcaller("where", np.array([True, False]))),
Expand Down Expand Up @@ -388,7 +377,6 @@ def idfn(x):

@pytest.mark.filterwarnings(
"ignore:DataFrame.fillna with 'method' is deprecated:FutureWarning",
"ignore:last is deprecated:FutureWarning",
)
@pytest.mark.parametrize("ndframe_method", _all_methods, ids=lambda x: idfn(x[-1]))
def test_finalize_called(ndframe_method):
Expand All @@ -401,39 +389,6 @@ def test_finalize_called(ndframe_method):
assert result.attrs == {"a": 1}


@pytest.mark.parametrize(
"data",
[
pd.Series(1, pd.date_range("2000", periods=4)),
pd.DataFrame({"A": [1, 1, 1, 1]}, pd.date_range("2000", periods=4)),
],
)
def test_finalize_first(data):
deprecated_msg = "first is deprecated"

data.attrs = {"a": 1}
with tm.assert_produces_warning(FutureWarning, match=deprecated_msg):
result = data.first("3D")
assert result.attrs == {"a": 1}


@pytest.mark.parametrize(
"data",
[
pd.Series(1, pd.date_range("2000", periods=4)),
pd.DataFrame({"A": [1, 1, 1, 1]}, pd.date_range("2000", periods=4)),
],
)
def test_finalize_last(data):
# GH 53710
deprecated_msg = "last is deprecated"

data.attrs = {"a": 1}
with tm.assert_produces_warning(FutureWarning, match=deprecated_msg):
result = data.last("3D")
assert result.attrs == {"a": 1}


@not_implemented_mark
def test_finalize_called_eval_numexpr():
pytest.importorskip("numexpr")
Expand Down

0 comments on commit 0e7b451

Please sign in to comment.