@@ -2277,52 +2277,50 @@ def test_get_engine_auto_error_message(self):
2277
2277
# TODO(GH#36893) fill this in when we add more engines
2278
2278
2279
2279
@pytest .mark .parametrize ("func" , ["read_sql" , "read_sql_query" ])
2280
- @pytest .mark .parametrize ("storage" , ["pyarrow" , "python" ])
2281
- def test_read_sql_nullable_dtypes (self , storage , func ):
2280
+ def test_read_sql_nullable_dtypes (self , string_storage , func ):
2282
2281
# GH#50048
2283
2282
table = "test"
2284
2283
df = self .nullable_data ()
2285
2284
df .to_sql (table , self .conn , index = False , if_exists = "replace" )
2286
2285
2287
- with pd .option_context ("mode.string_storage" , storage ):
2286
+ with pd .option_context ("mode.string_storage" , string_storage ):
2288
2287
result = getattr (pd , func )(
2289
2288
f"Select * from { table } " , self .conn , use_nullable_dtypes = True
2290
2289
)
2291
- expected = self .nullable_expected (storage )
2290
+ expected = self .nullable_expected (string_storage )
2292
2291
tm .assert_frame_equal (result , expected )
2293
2292
2294
- with pd .option_context ("mode.string_storage" , storage ):
2293
+ with pd .option_context ("mode.string_storage" , string_storage ):
2295
2294
iterator = getattr (pd , func )(
2296
2295
f"Select * from { table } " ,
2297
2296
self .conn ,
2298
2297
use_nullable_dtypes = True ,
2299
2298
chunksize = 3 ,
2300
2299
)
2301
- expected = self .nullable_expected (storage )
2300
+ expected = self .nullable_expected (string_storage )
2302
2301
for result in iterator :
2303
2302
tm .assert_frame_equal (result , expected )
2304
2303
2305
2304
@pytest .mark .parametrize ("func" , ["read_sql" , "read_sql_table" ])
2306
- @pytest .mark .parametrize ("storage" , ["pyarrow" , "python" ])
2307
- def test_read_sql_nullable_dtypes_table (self , storage , func ):
2305
+ def test_read_sql_nullable_dtypes_table (self , string_storage , func ):
2308
2306
# GH#50048
2309
2307
table = "test"
2310
2308
df = self .nullable_data ()
2311
2309
df .to_sql (table , self .conn , index = False , if_exists = "replace" )
2312
2310
2313
- with pd .option_context ("mode.string_storage" , storage ):
2311
+ with pd .option_context ("mode.string_storage" , string_storage ):
2314
2312
result = getattr (pd , func )(table , self .conn , use_nullable_dtypes = True )
2315
- expected = self .nullable_expected (storage )
2313
+ expected = self .nullable_expected (string_storage )
2316
2314
tm .assert_frame_equal (result , expected )
2317
2315
2318
- with pd .option_context ("mode.string_storage" , storage ):
2316
+ with pd .option_context ("mode.string_storage" , string_storage ):
2319
2317
iterator = getattr (pd , func )(
2320
2318
table ,
2321
2319
self .conn ,
2322
2320
use_nullable_dtypes = True ,
2323
2321
chunksize = 3 ,
2324
2322
)
2325
- expected = self .nullable_expected (storage )
2323
+ expected = self .nullable_expected (string_storage )
2326
2324
for result in iterator :
2327
2325
tm .assert_frame_equal (result , expected )
2328
2326
@@ -2453,8 +2451,7 @@ def nullable_expected(self, storage) -> DataFrame:
2453
2451
return super ().nullable_expected (storage ).astype ({"e" : "Int64" , "f" : "Int64" })
2454
2452
2455
2453
@pytest .mark .parametrize ("func" , ["read_sql" , "read_sql_table" ])
2456
- @pytest .mark .parametrize ("storage" , ["pyarrow" , "python" ])
2457
- def test_read_sql_nullable_dtypes_table (self , storage , func ):
2454
+ def test_read_sql_nullable_dtypes_table (self , string_storage , func ):
2458
2455
# GH#50048 Not supported for sqlite
2459
2456
pass
2460
2457
0 commit comments