Skip to content

DEPR: remove Int/Uint/Float64Index from pandas/tests/arrays #50875

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
Jan 20, 2023
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
3 changes: 1 addition & 2 deletions pandas/tests/arrays/categorical/test_constructors.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
timedelta_range,
)
import pandas._testing as tm
from pandas.core.api import Int64Index


class TestCategoricalConstructors:
Expand Down Expand Up @@ -74,7 +73,7 @@ def test_constructor_empty(self):
tm.assert_index_equal(c.categories, expected)

c = Categorical([], categories=[1, 2, 3])
expected = Int64Index([1, 2, 3])
expected = Index([1, 2, 3], dtype=np.int64)
tm.assert_index_equal(c.categories, expected)

def test_constructor_empty_boolean(self):
Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/arrays/integer/test_dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ def test_astype_nansafe():

@pytest.mark.parametrize("dropna", [True, False])
def test_construct_index(all_data, dropna):
# ensure that we do not coerce to Float64Index, rather
# keep as Index
# ensure that we do not coerce to different Index dtype or non-index

all_data = all_data[:10]
if dropna:
Expand Down
3 changes: 1 addition & 2 deletions pandas/tests/arrays/sparse/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import pandas as pd
from pandas import isna
import pandas._testing as tm
from pandas.core.api import Int64Index
from pandas.core.arrays.sparse import (
SparseArray,
SparseDtype,
Expand Down Expand Up @@ -469,7 +468,7 @@ def test_dropna(fill_value):
tm.assert_sp_array_equal(arr.dropna(), exp)

df = pd.DataFrame({"a": [0, 1], "b": arr})
expected_df = pd.DataFrame({"a": [1], "b": exp}, index=Int64Index([1]))
expected_df = pd.DataFrame({"a": [1], "b": exp}, index=pd.Index([1]))
tm.assert_equal(df.dropna(), expected_df)


Expand Down