Skip to content

Commit

Permalink
test: desable 'deflate' tests on MacOS; it fails on import (#1203)
Browse files Browse the repository at this point in the history
* test: desable 'deflate' tests on MacOS; it fails on import

* also add FIXME comments as a reminder to reinstate 'deflate' when it works again
  • Loading branch information
jpivarski committed May 5, 2024
1 parent 501a12f commit b818a26
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
3 changes: 3 additions & 0 deletions src/uproot/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import numbers
import os
import re
import sys
import warnings
from collections.abc import Iterable
from pathlib import Path
Expand All @@ -27,6 +28,8 @@
import uproot.source.fsspec
import uproot.source.object

macos = sys.platform == "darwin"


def tobytes(array):
"""
Expand Down
3 changes: 2 additions & 1 deletion tests/test_0008_start_interpretation.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ def test_file_header(use_isal):

@pytest.mark.parametrize("use_deflate", [False, True])
def test_file_header(use_deflate):
if use_deflate:
# FIXME: https://github.com/dcwatson/deflate/issues/42
if use_deflate and not uproot._util.macos:
pytest.importorskip("deflate")
uproot.ZLIB.use_deflate = use_deflate
filename = skhep_testdata.data_path("uproot-Zmumu.root")
Expand Down
21 changes: 14 additions & 7 deletions tests/test_0416_writing_compressed_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def test_ZLIB(use_isal):

@pytest.mark.parametrize("use_deflate", [False, True])
def test_deflate(use_deflate):
if use_deflate:
# FIXME: https://github.com/dcwatson/deflate/issues/42
if use_deflate and not uproot._util.macos:
pytest.importorskip("deflate")
uproot.ZLIB.library = "deflate"
else:
Expand Down Expand Up @@ -133,7 +134,8 @@ def test_histogram_ZLIB(tmp_path, use_isal):

@pytest.mark.parametrize("use_deflate", [False, True])
def test_histogram_deflate(tmp_path, use_deflate):
if use_deflate:
# FIXME: https://github.com/dcwatson/deflate/issues/42
if use_deflate and not uproot._util.macos:
pytest.importorskip("deflate")
uproot.ZLIB.library = "deflate"
else:
Expand Down Expand Up @@ -591,7 +593,8 @@ def test_multicompression_5(tmp_path, use_isal):

@pytest.mark.parametrize("use_deflate", [False, True])
def test_multicompression_1_deflate(tmp_path, use_deflate):
if use_deflate:
# FIXME: https://github.com/dcwatson/deflate/issues/42
if use_deflate and not uproot._util.macos:
pytest.importorskip("deflate")
uproot.ZLIB.library = "deflate"
else:
Expand Down Expand Up @@ -625,7 +628,8 @@ def test_multicompression_1_deflate(tmp_path, use_deflate):

@pytest.mark.parametrize("use_deflate", [False, True])
def test_multicompression_2_deflate(tmp_path, use_deflate):
if use_deflate:
# FIXME: https://github.com/dcwatson/deflate/issues/42
if use_deflate and not uproot._util.macos:
pytest.importorskip("deflate")
uproot.ZLIB.library = "deflate"
else:
Expand Down Expand Up @@ -658,7 +662,8 @@ def test_multicompression_2_deflate(tmp_path, use_deflate):

@pytest.mark.parametrize("use_deflate", [False, True])
def test_multicompression_3_deflate(tmp_path, use_deflate):
if use_deflate:
# FIXME: https://github.com/dcwatson/deflate/issues/42
if use_deflate and not uproot._util.macos:
pytest.importorskip("deflate")
uproot.ZLIB.library = "deflate"
else:
Expand Down Expand Up @@ -692,7 +697,8 @@ def test_multicompression_3_deflate(tmp_path, use_deflate):

@pytest.mark.parametrize("use_deflate", [False, True])
def test_multicompression_4_deflate(tmp_path, use_deflate):
if use_deflate:
# FIXME: https://github.com/dcwatson/deflate/issues/42
if use_deflate and not uproot._util.macos:
pytest.importorskip("deflate")
uproot.ZLIB.library = "deflate"
else:
Expand Down Expand Up @@ -724,7 +730,8 @@ def test_multicompression_4_deflate(tmp_path, use_deflate):

@pytest.mark.parametrize("use_deflate", [False, True])
def test_multicompression_5_deflate(tmp_path, use_deflate):
if use_deflate:
# FIXME: https://github.com/dcwatson/deflate/issues/42
if use_deflate and not uproot._util.macos:
pytest.importorskip("deflate")
uproot.ZLIB.library = "deflate"
else:
Expand Down

0 comments on commit b818a26

Please sign in to comment.