diff --git a/pandas/tests/io/pytables/test_file_handling.py b/pandas/tests/io/pytables/test_file_handling.py index ed5f8cde7db7b..d8f38e9cdad1f 100644 --- a/pandas/tests/io/pytables/test_file_handling.py +++ b/pandas/tests/io/pytables/test_file_handling.py @@ -8,6 +8,7 @@ is_ci_environment, is_platform_linux, is_platform_little_endian, + is_platform_mac, ) from pandas.errors import ( ClosedFileError, @@ -287,12 +288,17 @@ def test_complibs(tmp_path, lvl, lib, request): result = read_hdf(tmpfile, gname) tm.assert_frame_equal(result, df) + is_mac = is_platform_mac() + # Open file and check metadata for correct amount of compression with tables.open_file(tmpfile, mode="r") as h5table: for node in h5table.walk_nodes(where="/" + gname, classname="Leaf"): assert node.filters.complevel == lvl if lvl == 0: assert node.filters.complib is None + elif is_mac and lib == "blosc2": + res = node.filters.complib + assert res in [lib, "blosc2:blosclz"], res else: assert node.filters.complib == lib