Skip to content

Commit 0bcd250

Browse files
[backport 2.3.x] CI: update fastparquet xfails for new release (pandas-dev#60337) (pandas-dev#60344)
1 parent 2cf6869 commit 0bcd250

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

pandas/tests/io/test_parquet.py

+26-11
Original file line numberDiff line numberDiff line change
@@ -1223,11 +1223,17 @@ def test_duplicate_columns(self, fp):
12231223
msg = "Cannot create parquet dataset with duplicate column names"
12241224
self.check_error_on_write(df, fp, ValueError, msg)
12251225

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+
)
12311237
df = pd.DataFrame({"a": [True, None, False]})
12321238
expected = pd.DataFrame({"a": [1.0, np.nan, 0.0]}, dtype="float16")
12331239
# Fastparquet bug in 0.7.1 makes it so that this dtype becomes
@@ -1342,12 +1348,21 @@ def test_empty_dataframe(self, fp):
13421348
expected = df.copy()
13431349
check_round_trip(df, fp, expected=expected)
13441350

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+
13511366
idx = 5 * [timezone_aware_date_list]
13521367

13531368
df = pd.DataFrame(index=idx, data={"index_as_col": idx})

0 commit comments

Comments
 (0)