21
21
UNSIGNED_EA_INT_DTYPES ,
22
22
UNSIGNED_INT_DTYPES ,
23
23
)
24
- from pandas .core .sparse .api import SparseDtype
25
24
import pandas .util .testing as tm
26
25
27
26
ignore_sparse_warning = pytest .mark .filterwarnings ("ignore:Sparse:FutureWarning" )
@@ -182,7 +181,6 @@ def test_is_object():
182
181
@ignore_sparse_warning
183
182
def test_is_sparse (check_scipy ):
184
183
assert com .is_sparse (pd .SparseArray ([1 , 2 , 3 ]))
185
- assert com .is_sparse (pd .SparseSeries ([1 , 2 , 3 ]))
186
184
187
185
assert not com .is_sparse (np .array ([1 , 2 , 3 ]))
188
186
@@ -200,7 +198,6 @@ def test_is_scipy_sparse():
200
198
assert com .is_scipy_sparse (bsr_matrix ([1 , 2 , 3 ]))
201
199
202
200
assert not com .is_scipy_sparse (pd .SparseArray ([1 , 2 , 3 ]))
203
- assert not com .is_scipy_sparse (pd .SparseSeries ([1 , 2 , 3 ]))
204
201
205
202
206
203
def test_is_categorical ():
@@ -596,7 +593,6 @@ def test_is_extension_type(check_scipy):
596
593
assert com .is_extension_type (cat )
597
594
assert com .is_extension_type (pd .Series (cat ))
598
595
assert com .is_extension_type (pd .SparseArray ([1 , 2 , 3 ]))
599
- assert com .is_extension_type (pd .SparseSeries ([1 , 2 , 3 ]))
600
596
assert com .is_extension_type (pd .DatetimeIndex (["2000" ], tz = "US/Eastern" ))
601
597
602
598
dtype = DatetimeTZDtype ("ns" , tz = "US/Eastern" )
@@ -664,14 +660,6 @@ def test__get_dtype(input_param, result):
664
660
assert com ._get_dtype (input_param ) == result
665
661
666
662
667
- @ignore_sparse_warning
668
- def test__get_dtype_sparse ():
669
- ser = pd .SparseSeries ([1 , 2 ], dtype = "int32" )
670
- expected = SparseDtype ("int32" )
671
- assert com ._get_dtype (ser ) == expected
672
- assert com ._get_dtype (ser .dtype ) == expected
673
-
674
-
675
663
@pytest .mark .parametrize (
676
664
"input_param,expected_error_message" ,
677
665
[
@@ -723,11 +711,3 @@ def test__get_dtype_fails(input_param, expected_error_message):
723
711
)
724
712
def test__is_dtype_type (input_param , result ):
725
713
assert com ._is_dtype_type (input_param , lambda tipo : tipo == result )
726
-
727
-
728
- @ignore_sparse_warning
729
- def test__is_dtype_type_sparse ():
730
- ser = pd .SparseSeries ([1 , 2 ], dtype = "int32" )
731
- result = np .dtype ("int32" )
732
- assert com ._is_dtype_type (ser , lambda tipo : tipo == result )
733
- assert com ._is_dtype_type (ser .dtype , lambda tipo : tipo == result )
0 commit comments