From 37708e576e96eba8b82f7b052f74e50e1bd1a182 Mon Sep 17 00:00:00 2001 From: Brock Date: Tue, 27 Feb 2024 14:02:21 -0800 Subject: [PATCH] TST: fix test_complibs on mac --- pandas/tests/io/pytables/test_file_handling.py | 6 ++++++ 1 file changed, 6 insertions(+) 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