Skip to content

Commit

Permalink
Fix test failure on oldest build on Github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ericpre committed Jul 18, 2024
1 parent f9b7830 commit ce9902f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions hyperspy/tests/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,13 @@ def test_file_reader_warning(caplog, tmp_path):
try:
with caplog.at_level(logging.WARNING):
_ = hs.load(f, reader="some_unknown_file_extension")

assert "Unable to infer file type from extension" in caplog.text
except (ValueError, OSError):
except (ValueError, OSError, IndexError):
# Test fallback to Pillow imaging library
# IndexError is for oldest supported version build on Github CI
pass

assert "Unable to infer file type from extension" in caplog.text


def test_file_reader_options(tmp_path):
# Remove when fixed in rosettasciio
Expand Down

0 comments on commit ce9902f

Please sign in to comment.