@@ -433,8 +433,12 @@ def test_read_columns(self, engine):
433433 df , engine , expected = expected , read_kwargs = {"columns" : ["string" ]}
434434 )
435435
436- def test_write_index (self , engine ):
436+ def test_write_index (self , engine , using_copy_on_write , request ):
437437 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+ )
438442
439443 df = pd .DataFrame ({"A" : [1 , 2 , 3 ]})
440444 check_round_trip (df , engine )
@@ -1211,12 +1215,14 @@ def test_error_on_using_partition_cols_and_partition_on(
12111215 partition_cols = partition_cols ,
12121216 )
12131217
1218+ @pytest .mark .skipif (using_copy_on_write (), reason = "fastparquet writes into Index" )
12141219 def test_empty_dataframe (self , fp ):
12151220 # GH #27339
12161221 df = pd .DataFrame ()
12171222 expected = df .copy ()
12181223 check_round_trip (df , fp , expected = expected )
12191224
1225+ @pytest .mark .skipif (using_copy_on_write (), reason = "fastparquet writes into Index" )
12201226 def test_timezone_aware_index (self , fp , timezone_aware_date_list ):
12211227 idx = 5 * [timezone_aware_date_list ]
12221228
@@ -1326,6 +1332,7 @@ def test_invalid_dtype_backend(self, engine):
13261332 with pytest .raises (ValueError , match = msg ):
13271333 read_parquet (path , dtype_backend = "numpy" )
13281334
1335+ @pytest .mark .skipif (using_copy_on_write (), reason = "fastparquet writes into Index" )
13291336 def test_empty_columns (self , fp ):
13301337 # GH 52034
13311338 df = pd .DataFrame (index = pd .Index (["a" , "b" , "c" ], name = "custom name" ))
0 commit comments