Skip to content

Commit

Permalink
Fix test with exif_transpose image
Browse files Browse the repository at this point in the history
  • Loading branch information
albertvillanova committed Apr 18, 2024
1 parent 005b957 commit fc9a790
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/utils/test_image_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import numpy as np
import pytest
from huggingface_hub.file_download import http_get
from packaging import version
from requests import ConnectTimeout, ReadTimeout

from tests.pipelines.test_pipelines_document_question_answering import INVOICE_URL
Expand Down Expand Up @@ -586,7 +587,7 @@ def test_load_img_exif_transpose(self):

self.assertEqual(
img_arr_without_exif_transpose.shape,
(333, 500, 3),
(500, 333, 3) if version.parse(datasets.__version__) > version.parse("2.18.0") else (333, 500, 3),
)

img_with_exif_transpose = load_image(dataset[3]["image"])
Expand Down

0 comments on commit fc9a790

Please sign in to comment.