Skip to content

Commit 015f8d3

Browse files
authored
TST: fix test_complibs on mac (#57652)
1 parent 47cd690 commit 015f8d3

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pandas/tests/io/pytables/test_file_handling.py

+6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
is_ci_environment,
99
is_platform_linux,
1010
is_platform_little_endian,
11+
is_platform_mac,
1112
)
1213
from pandas.errors import (
1314
ClosedFileError,
@@ -287,12 +288,17 @@ def test_complibs(tmp_path, lvl, lib, request):
287288
result = read_hdf(tmpfile, gname)
288289
tm.assert_frame_equal(result, df)
289290

291+
is_mac = is_platform_mac()
292+
290293
# Open file and check metadata for correct amount of compression
291294
with tables.open_file(tmpfile, mode="r") as h5table:
292295
for node in h5table.walk_nodes(where="/" + gname, classname="Leaf"):
293296
assert node.filters.complevel == lvl
294297
if lvl == 0:
295298
assert node.filters.complib is None
299+
elif is_mac and lib == "blosc2":
300+
res = node.filters.complib
301+
assert res in [lib, "blosc2:blosclz"], res
296302
else:
297303
assert node.filters.complib == lib
298304

0 commit comments

Comments
 (0)