Skip to content

Commit

Permalink
DEPR: remove Int/Uint/Float64Index from pandas/tests/arrays (#50875)
Browse files Browse the repository at this point in the history

Co-authored-by: Terji Petersen <terjipetersen@Terjis-Air.fritz.box>
  • Loading branch information
topper-123 and Terji Petersen authored Jan 20, 2023
1 parent 1f1f645 commit 3fa869e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
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

0 comments on commit 3fa869e

Please sign in to comment.