1313
1414from pandas ._config import get_option
1515
16- from pandas .compat import (
17- PY310 ,
18- is_platform_windows ,
19- )
16+ from pandas .compat import is_platform_windows
2017from pandas .compat .pyarrow import (
2118 pa_version_under2p0 ,
2219 pa_version_under5p0 ,
@@ -265,7 +262,6 @@ def test_options_py(df_compat, pa):
265262 check_round_trip (df_compat )
266263
267264
268- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
269265def test_options_fp (df_compat , fp ):
270266 # use the set option
271267
@@ -343,7 +339,6 @@ def test_get_engine_auto_error_message():
343339 get_engine ("auto" )
344340
345341
346- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
347342def test_cross_engine_pa_fp (df_cross_compat , pa , fp ):
348343 # cross-compat with differing reading/writing engines
349344
@@ -409,11 +404,7 @@ def test_error(self, engine):
409404 msg = "to_parquet only supports IO with DataFrames"
410405 self .check_error_on_write (obj , engine , ValueError , msg )
411406
412- def test_columns_dtypes (self , request , engine ):
413- if PY310 and engine == "fastparquet" :
414- request .node .add_marker (
415- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
416- )
407+ def test_columns_dtypes (self , engine ):
417408 df = pd .DataFrame ({"string" : list ("abc" ), "int" : list (range (1 , 4 ))})
418409
419410 # unicode
@@ -440,39 +431,27 @@ def test_columns_dtypes_invalid(self, engine):
440431 self .check_error_on_write (df , engine , ValueError , msg )
441432
442433 @pytest .mark .parametrize ("compression" , [None , "gzip" , "snappy" , "brotli" ])
443- def test_compression (self , engine , compression , request ):
434+ def test_compression (self , engine , compression ):
444435
445436 if compression == "snappy" :
446437 pytest .importorskip ("snappy" )
447438
448439 elif compression == "brotli" :
449440 pytest .importorskip ("brotli" )
450441
451- if PY310 and engine == "fastparquet" :
452- request .node .add_marker (
453- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
454- )
455442 df = pd .DataFrame ({"A" : [1 , 2 , 3 ]})
456443 check_round_trip (df , engine , write_kwargs = {"compression" : compression })
457444
458- def test_read_columns (self , engine , request ):
445+ def test_read_columns (self , engine ):
459446 # GH18154
460- if PY310 and engine == "fastparquet" :
461- request .node .add_marker (
462- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
463- )
464447 df = pd .DataFrame ({"string" : list ("abc" ), "int" : list (range (1 , 4 ))})
465448
466449 expected = pd .DataFrame ({"string" : list ("abc" )})
467450 check_round_trip (
468451 df , engine , expected = expected , read_kwargs = {"columns" : ["string" ]}
469452 )
470453
471- def test_write_index (self , engine , request ):
472- if PY310 and engine == "fastparquet" :
473- request .node .add_marker (
474- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
475- )
454+ def test_write_index (self , engine ):
476455 check_names = engine != "fastparquet"
477456
478457 df = pd .DataFrame ({"A" : [1 , 2 , 3 ]})
@@ -521,13 +500,9 @@ def test_multiindex_with_columns(self, pa):
521500 df , engine , read_kwargs = {"columns" : ["A" , "B" ]}, expected = df [["A" , "B" ]]
522501 )
523502
524- def test_write_ignoring_index (self , engine , request ):
503+ def test_write_ignoring_index (self , engine ):
525504 # ENH 20768
526505 # Ensure index=False omits the index from the written Parquet file.
527- if PY310 and engine == "fastparquet" :
528- request .node .add_marker (
529- pytest .mark .xfail (reason = "fastparquet failing on 3.10" )
530- )
531506 df = pd .DataFrame ({"a" : [1 , 2 , 3 ], "b" : ["q" , "r" , "s" ]})
532507
533508 write_kwargs = {"compression" : None , "index" : False }
@@ -1011,7 +986,6 @@ def test_read_parquet_manager(self, pa, using_array_manager):
1011986
1012987
1013988class TestParquetFastParquet (Base ):
1014- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
1015989 def test_basic (self , fp , df_full ):
1016990 df = df_full
1017991
@@ -1029,7 +1003,6 @@ def test_duplicate_columns(self, fp):
10291003 msg = "Cannot create parquet dataset with duplicate column names"
10301004 self .check_error_on_write (df , fp , ValueError , msg )
10311005
1032- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10331006 def test_bool_with_none (self , fp ):
10341007 df = pd .DataFrame ({"a" : [True , None , False ]})
10351008 expected = pd .DataFrame ({"a" : [1.0 , np .nan , 0.0 ]}, dtype = "float16" )
@@ -1049,12 +1022,10 @@ def test_unsupported(self, fp):
10491022 msg = "Can't infer object conversion type"
10501023 self .check_error_on_write (df , fp , ValueError , msg )
10511024
1052- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10531025 def test_categorical (self , fp ):
10541026 df = pd .DataFrame ({"a" : pd .Categorical (list ("abc" ))})
10551027 check_round_trip (df , fp )
10561028
1057- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10581029 def test_filter_row_groups (self , fp ):
10591030 d = {"a" : list (range (0 , 3 ))}
10601031 df = pd .DataFrame (d )
@@ -1073,7 +1044,6 @@ def test_s3_roundtrip(self, df_compat, s3_resource, fp, s3so):
10731044 write_kwargs = {"compression" : None , "storage_options" : s3so },
10741045 )
10751046
1076- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10771047 def test_partition_cols_supported (self , fp , df_full ):
10781048 # GH #23283
10791049 partition_cols = ["bool" , "int" ]
@@ -1091,7 +1061,6 @@ def test_partition_cols_supported(self, fp, df_full):
10911061 actual_partition_cols = fastparquet .ParquetFile (path , False ).cats
10921062 assert len (actual_partition_cols ) == 2
10931063
1094- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
10951064 def test_partition_cols_string (self , fp , df_full ):
10961065 # GH #27117
10971066 partition_cols = "bool"
@@ -1109,7 +1078,6 @@ def test_partition_cols_string(self, fp, df_full):
11091078 actual_partition_cols = fastparquet .ParquetFile (path , False ).cats
11101079 assert len (actual_partition_cols ) == 1
11111080
1112- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
11131081 def test_partition_on_supported (self , fp , df_full ):
11141082 # GH #23283
11151083 partition_cols = ["bool" , "int" ]
@@ -1145,15 +1113,13 @@ def test_error_on_using_partition_cols_and_partition_on(self, fp, df_full):
11451113 partition_cols = partition_cols ,
11461114 )
11471115
1148- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
11491116 def test_empty_dataframe (self , fp ):
11501117 # GH #27339
11511118 df = pd .DataFrame ()
11521119 expected = df .copy ()
11531120 expected .index .name = "index"
11541121 check_round_trip (df , fp , expected = expected )
11551122
1156- @pytest .mark .xfail (PY310 , reason = "fastparquet failing on 3.10" )
11571123 def test_timezone_aware_index (self , fp , timezone_aware_date_list ):
11581124 idx = 5 * [timezone_aware_date_list ]
11591125
0 commit comments