@@ -149,29 +149,29 @@ def test_concat_mixed_dtypes(self, data):
149
149
def test_stack (self , data , columns , future_stack ):
150
150
super ().test_stack (data , columns , future_stack )
151
151
152
- def test_concat_columns (self , data ):
152
+ def test_concat_columns (self , data , na_value ):
153
153
self ._check_unsupported (data )
154
- super ().test_concat_columns (data )
154
+ super ().test_concat_columns (data , na_value )
155
155
156
- def test_concat_extension_arrays_copy_false (self , data ):
156
+ def test_concat_extension_arrays_copy_false (self , data , na_value ):
157
157
self ._check_unsupported (data )
158
- super ().test_concat_extension_arrays_copy_false (data )
158
+ super ().test_concat_extension_arrays_copy_false (data , na_value )
159
159
160
- def test_align (self , data ):
160
+ def test_align (self , data , na_value ):
161
161
self ._check_unsupported (data )
162
- super ().test_align (data )
162
+ super ().test_align (data , na_value )
163
163
164
- def test_align_frame (self , data ):
164
+ def test_align_frame (self , data , na_value ):
165
165
self ._check_unsupported (data )
166
- super ().test_align_frame (data )
166
+ super ().test_align_frame (data , na_value )
167
167
168
- def test_align_series_frame (self , data ):
168
+ def test_align_series_frame (self , data , na_value ):
169
169
self ._check_unsupported (data )
170
- super ().test_align_series_frame (data )
170
+ super ().test_align_series_frame (data , na_value )
171
171
172
- def test_merge (self , data ):
172
+ def test_merge (self , data , na_value ):
173
173
self ._check_unsupported (data )
174
- super ().test_merge (data )
174
+ super ().test_merge (data , na_value )
175
175
176
176
177
177
class TestGetitem (BaseSparseTests , base .BaseGetitemTests ):
@@ -183,9 +183,9 @@ def test_get(self, data):
183
183
assert ser .get (4 ) == ser .iloc [2 ]
184
184
assert ser .get (2 ) == ser .iloc [1 ]
185
185
186
- def test_reindex (self , data ):
186
+ def test_reindex (self , data , na_value ):
187
187
self ._check_unsupported (data )
188
- super ().test_reindex (data )
188
+ super ().test_reindex (data , na_value )
189
189
190
190
191
191
class TestSetitem (BaseSparseTests , base .BaseSetitemTests ):
@@ -285,7 +285,7 @@ def test_fillna_copy_series(self, data_missing, using_copy_on_write):
285
285
def test_fillna_length_mismatch (self , data_missing ):
286
286
super ().test_fillna_length_mismatch (data_missing )
287
287
288
- def test_where_series (self , data ):
288
+ def test_where_series (self , data , na_value ):
289
289
assert data [0 ] != data [1 ]
290
290
cls = type (data )
291
291
a , b = data [:2 ]
@@ -296,7 +296,6 @@ def test_where_series(self, data):
296
296
result = ser .where (cond )
297
297
298
298
new_dtype = SparseDtype ("float" , 0.0 )
299
- na_value = data .dtype .na_value
300
299
expected = pd .Series (
301
300
cls ._from_sequence ([a , a , na_value , na_value ], dtype = new_dtype )
302
301
)
@@ -320,15 +319,15 @@ def test_shift_0_periods(self, data):
320
319
assert result ._sparse_values [0 ] != result ._sparse_values [1 ]
321
320
322
321
@pytest .mark .parametrize ("method" , ["argmax" , "argmin" ])
323
- def test_argmin_argmax_all_na (self , method , data ):
322
+ def test_argmin_argmax_all_na (self , method , data , na_value ):
324
323
# overriding because Sparse[int64, 0] cannot handle na_value
325
324
self ._check_unsupported (data )
326
- super ().test_argmin_argmax_all_na (method , data )
325
+ super ().test_argmin_argmax_all_na (method , data , na_value )
327
326
328
327
@pytest .mark .parametrize ("box" , [pd .array , pd .Series , pd .DataFrame ])
329
- def test_equals (self , data , as_series , box ):
328
+ def test_equals (self , data , na_value , as_series , box ):
330
329
self ._check_unsupported (data )
331
- super ().test_equals (data , as_series , box )
330
+ super ().test_equals (data , na_value , as_series , box )
332
331
333
332
@pytest .mark .parametrize (
334
333
"func, na_action, expected" ,
0 commit comments