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