1313
1414from pandas ._config import get_option
1515
16- from pandas .compat import PY310
1716from pandas .compat .pyarrow import (
1817 pa_version_under2p0 ,
1918 pa_version_under5p0 ,
@@ -262,7 +261,6 @@ def test_options_py(df_compat, pa):
262261 check_round_trip (df_compat )
263262
264263
265- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
266264def test_options_fp (df_compat , fp ):
267265 # use the set option
268266
@@ -340,7 +338,6 @@ def test_get_engine_auto_error_message():
340338 get_engine ("auto" )
341339
342340
343- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
344341def test_cross_engine_pa_fp (df_cross_compat , pa , fp ):
345342 # cross-compat with differing reading/writing engines
346343
@@ -407,11 +404,7 @@ def test_error(self, engine):
407404 msg = "to_parquet only supports IO with DataFrames"
408405 self .check_error_on_write (obj , engine , ValueError , msg )
409406
410- def test_columns_dtypes (self , request , engine ):
411- if PY310 and engine == "fastparquet" :
412- request .node .add_marker (
413- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
414- )
407+ def test_columns_dtypes (self , engine ):
415408 df = pd .DataFrame ({"string" : list ("abc" ), "int" : list (range (1 , 4 ))})
416409
417410 # unicode
@@ -438,39 +431,27 @@ def test_columns_dtypes_invalid(self, engine):
438431 self .check_error_on_write (df , engine , ValueError , msg )
439432
440433 @pytest .mark .parametrize ("compression" , [None , "gzip" , "snappy" , "brotli" ])
441- def test_compression (self , engine , compression , request ):
434+ def test_compression (self , engine , compression ):
442435
443436 if compression == "snappy" :
444437 pytest .importorskip ("snappy" )
445438
446439 elif compression == "brotli" :
447440 pytest .importorskip ("brotli" )
448441
449- if PY310 and engine == "fastparquet" :
450- request .node .add_marker (
451- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
452- )
453442 df = pd .DataFrame ({"A" : [1 , 2 , 3 ]})
454443 check_round_trip (df , engine , write_kwargs = {"compression" : compression })
455444
456- def test_read_columns (self , engine , request ):
445+ def test_read_columns (self , engine ):
457446 # GH18154
458- if PY310 and engine == "fastparquet" :
459- request .node .add_marker (
460- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
461- )
462447 df = pd .DataFrame ({"string" : list ("abc" ), "int" : list (range (1 , 4 ))})
463448
464449 expected = pd .DataFrame ({"string" : list ("abc" )})
465450 check_round_trip (
466451 df , engine , expected = expected , read_kwargs = {"columns" : ["string" ]}
467452 )
468453
469- def test_write_index (self , engine , request ):
470- if PY310 and engine == "fastparquet" :
471- request .node .add_marker (
472- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
473- )
454+ def test_write_index (self , engine ):
474455 check_names = engine != "fastparquet"
475456
476457 df = pd .DataFrame ({"A" : [1 , 2 , 3 ]})
@@ -519,13 +500,9 @@ def test_multiindex_with_columns(self, pa):
519500 df , engine , read_kwargs = {"columns" : ["A" , "B" ]}, expected = df [["A" , "B" ]]
520501 )
521502
522- def test_write_ignoring_index (self , engine , request ):
503+ def test_write_ignoring_index (self , engine ):
523504 # ENH 20768
524505 # Ensure index=False omits the index from the written Parquet file.
525- if PY310 and engine == "fastparquet" :
526- request .node .add_marker (
527- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
528- )
529506 df = pd .DataFrame ({"a" : [1 , 2 , 3 ], "b" : ["q" , "r" , "s" ]})
530507
531508 write_kwargs = {"compression" : None , "index" : False }
@@ -981,7 +958,6 @@ def test_read_parquet_manager(self, pa, using_array_manager):
981958
982959
983960class TestParquetFastParquet (Base ):
984- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
985961 def test_basic (self , fp , df_full ):
986962 df = df_full
987963
@@ -999,7 +975,6 @@ def test_duplicate_columns(self, fp):
999975 msg = "Cannot create parquet dataset with duplicate column names"
1000976 self .check_error_on_write (df , fp , ValueError , msg )
1001977
1002- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
1003978 def test_bool_with_none (self , fp ):
1004979 df = pd .DataFrame ({"a" : [True , None , False ]})
1005980 expected = pd .DataFrame ({"a" : [1.0 , np .nan , 0.0 ]}, dtype = "float16" )
@@ -1019,12 +994,10 @@ def test_unsupported(self, fp):
1019994 msg = "Can't infer object conversion type"
1020995 self .check_error_on_write (df , fp , ValueError , msg )
1021996
1022- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
1023997 def test_categorical (self , fp ):
1024998 df = pd .DataFrame ({"a" : pd .Categorical (list ("abc" ))})
1025999 check_round_trip (df , fp )
10261000
1027- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10281001 def test_filter_row_groups (self , fp ):
10291002 d = {"a" : list (range (0 , 3 ))}
10301003 df = pd .DataFrame (d )
@@ -1043,7 +1016,6 @@ def test_s3_roundtrip(self, df_compat, s3_resource, fp, s3so):
10431016 write_kwargs = {"compression" : None , "storage_options" : s3so },
10441017 )
10451018
1046- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10471019 def test_partition_cols_supported (self , fp , df_full ):
10481020 # GH #23283
10491021 partition_cols = ["bool" , "int" ]
@@ -1061,7 +1033,6 @@ def test_partition_cols_supported(self, fp, df_full):
10611033 actual_partition_cols = fastparquet .ParquetFile (path , False ).cats
10621034 assert len (actual_partition_cols ) == 2
10631035
1064- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10651036 def test_partition_cols_string (self , fp , df_full ):
10661037 # GH #27117
10671038 partition_cols = "bool"
@@ -1079,7 +1050,6 @@ def test_partition_cols_string(self, fp, df_full):
10791050 actual_partition_cols = fastparquet .ParquetFile (path , False ).cats
10801051 assert len (actual_partition_cols ) == 1
10811052
1082- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10831053 def test_partition_on_supported (self , fp , df_full ):
10841054 # GH #23283
10851055 partition_cols = ["bool" , "int" ]
@@ -1115,15 +1085,13 @@ def test_error_on_using_partition_cols_and_partition_on(self, fp, df_full):
11151085 partition_cols = partition_cols ,
11161086 )
11171087
1118- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
11191088 def test_empty_dataframe (self , fp ):
11201089 # GH #27339
11211090 df = pd .DataFrame ()
11221091 expected = df .copy ()
11231092 expected .index .name = "index"
11241093 check_round_trip (df , fp , expected = expected )
11251094
1126- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
11271095 def test_timezone_aware_index (self , fp , timezone_aware_date_list ):
11281096 idx = 5 * [timezone_aware_date_list ]
11291097
0 commit comments