@@ -1223,11 +1223,17 @@ def test_duplicate_columns(self, fp):
1223
1223
msg = "Cannot create parquet dataset with duplicate column names"
1224
1224
self .check_error_on_write (df , fp , ValueError , msg )
1225
1225
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 ):
1226
+ def test_bool_with_none (self , fp , request ):
1227
+ import fastparquet
1228
+
1229
+ if Version (fastparquet .__version__ ) < Version ("2024.11.0" ) and Version (
1230
+ np .__version__
1231
+ ) >= Version ("2.0.0" ):
1232
+ request .applymarker (
1233
+ pytest .mark .xfail (
1234
+ reason = ("fastparquet uses np.float_ in numpy2" ),
1235
+ )
1236
+ )
1231
1237
df = pd .DataFrame ({"a" : [True , None , False ]})
1232
1238
expected = pd .DataFrame ({"a" : [1.0 , np .nan , 0.0 ]}, dtype = "float16" )
1233
1239
# Fastparquet bug in 0.7.1 makes it so that this dtype becomes
@@ -1342,12 +1348,21 @@ def test_empty_dataframe(self, fp):
1342
1348
expected = df .copy ()
1343
1349
check_round_trip (df , fp , expected = expected )
1344
1350
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 ):
1351
+ def test_timezone_aware_index (self , fp , timezone_aware_date_list , request ):
1352
+ import fastparquet
1353
+
1354
+ if Version (fastparquet .__version__ ) > Version ("2022.12" ) and Version (
1355
+ fastparquet .__version__
1356
+ ) < Version ("2024.11.0" ):
1357
+ request .applymarker (
1358
+ pytest .mark .xfail (
1359
+ reason = (
1360
+ "fastparquet bug, see "
1361
+ "https://github.com/dask/fastparquet/issues/929"
1362
+ ),
1363
+ )
1364
+ )
1365
+
1351
1366
idx = 5 * [timezone_aware_date_list ]
1352
1367
1353
1368
df = pd .DataFrame (index = idx , data = {"index_as_col" : idx })
0 commit comments