Skip to content

Commit e1824cf

Browse files
committed
remove no-longer-overriden tests
1 parent 23c2eb5 commit e1824cf

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

pandas/tests/extension/test_sparse.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
from pandas.errors import PerformanceWarning
2121

22-
from pandas.core.dtypes.common import is_object_dtype
23-
2422
import pandas as pd
2523
from pandas import SparseDtype
2624
import pandas._testing as tm
@@ -382,27 +380,6 @@ def test_equals(self, data, na_value, as_series, box):
382380

383381

384382
class TestCasting(BaseSparseTests, base.BaseCastingTests):
385-
def _test_astype_object_series(self, all_data):
386-
# Unlike the base class, we do not expect the resulting Block
387-
# to be ObjectBlock / resulting array to be np.dtype("object")
388-
ser = pd.Series(all_data, name="A")
389-
with tm.assert_produces_warning(FutureWarning, match="astype from Sparse"):
390-
result = ser.astype(object)
391-
assert is_object_dtype(result.dtype)
392-
assert is_object_dtype(result._mgr.array.dtype)
393-
394-
def _test_astype_object_frame(self, all_data):
395-
# Unlike the base class, we do not expect the resulting Block
396-
# to be ObjectBlock / resulting array to be np.dtype("object")
397-
df = pd.DataFrame({"A": all_data})
398-
399-
result = df.astype(object)
400-
assert is_object_dtype(result._mgr.arrays[0].dtype)
401-
402-
# check that we can compare the dtypes
403-
comp = result.dtypes == df.dtypes
404-
assert not comp.any()
405-
406383
def test_astype_str(self, data):
407384
# pre-2.0 this would give a SparseDtype even if the user asked
408385
# for a non-sparse dtype.

0 commit comments

Comments
 (0)