@@ -1187,7 +1187,16 @@ def test_infer_string_large_string_type(self, tmp_path, pa):
1187
1187
1188
1188
1189
1189
class 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
+
1191
1200
df = df_full
1192
1201
1193
1202
dti = pd .date_range ("20130101" , periods = 3 , tz = "US/Eastern" )
@@ -1223,11 +1232,17 @@ def test_duplicate_columns(self, fp):
1223
1232
msg = "Cannot create parquet dataset with duplicate column names"
1224
1233
self .check_error_on_write (df , fp , ValueError , msg )
1225
1234
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
+ )
1231
1246
df = pd .DataFrame ({"a" : [True , None , False ]})
1232
1247
expected = pd .DataFrame ({"a" : [1.0 , np .nan , 0.0 ]}, dtype = "float16" )
1233
1248
# Fastparquet bug in 0.7.1 makes it so that this dtype becomes
@@ -1342,12 +1357,19 @@ def test_empty_dataframe(self, fp):
1342
1357
expected = df .copy ()
1343
1358
check_round_trip (df , fp , expected = expected )
1344
1359
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
+
1351
1373
idx = 5 * [timezone_aware_date_list ]
1352
1374
1353
1375
df = pd .DataFrame (index = idx , data = {"index_as_col" : idx })
0 commit comments