Skip to content

Commit

Permalink
Fix test issue on s390x
Browse files Browse the repository at this point in the history
Anytime the TIFF RGBA interface is involved, the endianness must be
taken into account.

Closes: #654
  • Loading branch information
johnevans8msu committed May 7, 2024
1 parent cb25720 commit a91e861
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_libtiff.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# standard library imports
import importlib.resources as ir
import platform
import sys
import unittest
from unittest.mock import patch
import warnings
Expand Down Expand Up @@ -119,6 +120,9 @@ def test_bigtiff_ycbcr_2x2_tiled(self):
actual = libtiff.readRGBAImageOriented(fp)
libtiff.close(fp)

# Adjust for big-endian if necessary
actual = np.flip(actual, 2) if sys.byteorder == 'big' else actual

error = fixtures.skimage.metrics.mean_squared_error(
actual[:, :, :3], expected
)
Expand Down

0 comments on commit a91e861

Please sign in to comment.