@@ -1174,9 +1174,17 @@ def test_non_nanosecond_timestamps(self, temp_file):
1174
1174
1175
1175
1176
1176
class TestParquetFastParquet(Base):
1177
- @pytest.mark.xfail(reason="datetime_with_nat gets incorrect values")
1178
- def test_basic(self, fp, df_full):
1177
+ def test_basic(self, fp, df_full, request):
1179
1178
pytz = pytest.importorskip("pytz")
1179
+ import fastparquet
1180
+
1181
+ if Version(fastparquet.__version__) < Version("2024.11.0"):
1182
+ request.applymarker(
1183
+ pytest.mark.xfail(
1184
+ reason=("datetime_with_nat gets incorrect values"),
1185
+ )
1186
+ )
1187
+
1180
1188
tz = pytz.timezone("US/Eastern")
1181
1189
df = df_full
1182
1190
@@ -1213,11 +1221,17 @@ def test_duplicate_columns(self, fp):
1213
1221
msg = "Cannot create parquet dataset with duplicate column names"
1214
1222
self.check_error_on_write(df, fp, ValueError, msg)
1215
1223
1216
- @pytest.mark.xfail(
1217
- Version(np.__version__) >= Version("2.0.0"),
1218
- reason="fastparquet uses np.float_ in numpy2",
1219
- )
1220
- def test_bool_with_none(self, fp):
1224
+ def test_bool_with_none(self, fp, request):
1225
+ import fastparquet
1226
+
1227
+ if Version(fastparquet.__version__) < Version("2024.11.0") and Version(
1228
+ np.__version__
1229
+ ) >= Version("2.0.0"):
1230
+ request.applymarker(
1231
+ pytest.mark.xfail(
1232
+ reason=("fastparquet uses np.float_ in numpy2"),
1233
+ )
1234
+ )
1221
1235
df = pd.DataFrame({"a": [True, None, False]})
1222
1236
expected = pd.DataFrame({"a": [1.0, np.nan, 0.0]}, dtype="float16")
1223
1237
# Fastparquet bug in 0.7.1 makes it so that this dtype becomes
@@ -1331,10 +1345,19 @@ def test_empty_dataframe(self, fp):
1331
1345
expected = df.copy()
1332
1346
check_round_trip(df, fp, expected=expected)
1333
1347
1334
- @pytest.mark.xfail(
1335
- reason="fastparquet bug, see https://github.com/dask/fastparquet/issues/929"
1336
- )
1337
- def test_timezone_aware_index(self, fp, timezone_aware_date_list):
1348
+ def test_timezone_aware_index(self, fp, timezone_aware_date_list, request):
1349
+ import fastparquet
1350
+
1351
+ if Version(fastparquet.__version__) < Version("2024.11.0"):
1352
+ request.applymarker(
1353
+ pytest.mark.xfail(
1354
+ reason=(
1355
+ "fastparquet bug, see "
1356
+ "https://github.com/dask/fastparquet/issues/929"
1357
+ ),
1358
+ )
1359
+ )
1360
+
1338
1361
idx = 5 * [timezone_aware_date_list]
1339
1362
1340
1363
df = pd.DataFrame(index=idx, data={"index_as_col": idx})
0 commit comments