@@ -433,8 +433,12 @@ def test_read_columns(self, engine):
433
433
df , engine , expected = expected , read_kwargs = {"columns" : ["string" ]}
434
434
)
435
435
436
- def test_write_index (self , engine ):
436
+ def test_write_index (self , engine , using_copy_on_write , request ):
437
437
check_names = engine != "fastparquet"
438
+ if using_copy_on_write and engine == "fastparquet" :
439
+ request .node .add_marker (
440
+ pytest .mark .xfail (reason = "fastparquet write into index" )
441
+ )
438
442
439
443
df = pd .DataFrame ({"A" : [1 , 2 , 3 ]})
440
444
check_round_trip (df , engine )
@@ -1213,12 +1217,14 @@ def test_error_on_using_partition_cols_and_partition_on(
1213
1217
partition_cols = partition_cols ,
1214
1218
)
1215
1219
1220
+ @pytest .mark .skipif (using_copy_on_write (), reason = "fastparquet writes into Index" )
1216
1221
def test_empty_dataframe (self , fp ):
1217
1222
# GH #27339
1218
1223
df = pd .DataFrame ()
1219
1224
expected = df .copy ()
1220
1225
check_round_trip (df , fp , expected = expected )
1221
1226
1227
+ @pytest .mark .skipif (using_copy_on_write (), reason = "fastparquet writes into Index" )
1222
1228
def test_timezone_aware_index (self , fp , timezone_aware_date_list ):
1223
1229
idx = 5 * [timezone_aware_date_list ]
1224
1230
@@ -1328,6 +1334,7 @@ def test_invalid_dtype_backend(self, engine):
1328
1334
with pytest .raises (ValueError , match = msg ):
1329
1335
read_parquet (path , dtype_backend = "numpy" )
1330
1336
1337
+ @pytest .mark .skipif (using_copy_on_write (), reason = "fastparquet writes into Index" )
1331
1338
def test_empty_columns (self , fp ):
1332
1339
# GH 52034
1333
1340
df = pd .DataFrame (index = pd .Index (["a" , "b" , "c" ], name = "custom name" ))
0 commit comments