@@ -1187,7 +1187,16 @@ def test_infer_string_large_string_type(self, tmp_path, pa):
11871187
11881188
11891189class TestParquetFastParquet (Base ):
1190- def test_basic (self , fp , df_full ):
1190+ def test_basic (self , fp , df_full , request ):
1191+ import fastparquet
1192+
1193+ if Version (fastparquet .__version__ ) < Version ("2024.11.0" ):
1194+ request .applymarker (
1195+ pytest .mark .xfail (
1196+ reason = ("datetime_with_nat gets incorrect values" ),
1197+ )
1198+ )
1199+
11911200 df = df_full
11921201
11931202 dti = pd .date_range ("20130101" , periods = 3 , tz = "US/Eastern" )
@@ -1223,11 +1232,17 @@ def test_duplicate_columns(self, fp):
12231232 msg = "Cannot create parquet dataset with duplicate column names"
12241233 self .check_error_on_write (df , fp , ValueError , msg )
12251234
1226- @pytest .mark .xfail (
1227- Version (np .__version__ ) >= Version ("2.0.0" ),
1228- reason = "fastparquet uses np.float_ in numpy2" ,
1229- )
1230- def test_bool_with_none (self , fp ):
1235+ def test_bool_with_none (self , fp , request ):
1236+ import fastparquet
1237+
1238+ if Version (fastparquet .__version__ ) < Version ("2024.11.0" ) and Version (
1239+ np .__version__
1240+ ) >= Version ("2.0.0" ):
1241+ request .applymarker (
1242+ pytest .mark .xfail (
1243+ reason = ("fastparquet uses np.float_ in numpy2" ),
1244+ )
1245+ )
12311246 df = pd .DataFrame ({"a" : [True , None , False ]})
12321247 expected = pd .DataFrame ({"a" : [1.0 , np .nan , 0.0 ]}, dtype = "float16" )
12331248 # Fastparquet bug in 0.7.1 makes it so that this dtype becomes
@@ -1342,12 +1357,19 @@ def test_empty_dataframe(self, fp):
13421357 expected = df .copy ()
13431358 check_round_trip (df , fp , expected = expected )
13441359
1345- @pytest .mark .xfail (
1346- _HAVE_FASTPARQUET and Version (fastparquet .__version__ ) > Version ("2022.12" ),
1347- reason = "fastparquet bug, see https://github.com/dask/fastparquet/issues/929" ,
1348- )
1349- @pytest .mark .skipif (using_copy_on_write (), reason = "fastparquet writes into Index" )
1350- def test_timezone_aware_index (self , fp , timezone_aware_date_list ):
1360+ def test_timezone_aware_index (self , fp , timezone_aware_date_list , request ):
1361+ import fastparquet
1362+
1363+ if Version (fastparquet .__version__ ) < Version ("2024.11.0" ):
1364+ request .applymarker (
1365+ pytest .mark .xfail (
1366+ reason = (
1367+ "fastparquet bug, see "
1368+ "https://github.com/dask/fastparquet/issues/929"
1369+ ),
1370+ )
1371+ )
1372+
13511373 idx = 5 * [timezone_aware_date_list ]
13521374
13531375 df = pd .DataFrame (index = idx , data = {"index_as_col" : idx })
0 commit comments