Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated pillow, unlocked test #7100

Merged
merged 22 commits into from
Dec 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More logging
  • Loading branch information
bsekachev committed Dec 27, 2023
commit 8a9787db098ccaeb14416b57ba82657841740570
14 changes: 13 additions & 1 deletion tests/python/rest_api/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
#
# SPDX-License-Identifier: MIT

import base64
import io
import json
import os
import os.path as osp
import zipfile
from io import BytesIO
from copy import deepcopy
from functools import partial
from http import HTTPStatus
Expand Down Expand Up @@ -915,7 +917,17 @@ def test_can_create_task_with_exif_rotated_tif_image(self):
)

with zipfile.ZipFile(io.BytesIO(response.data)) as zip_file:
print(zip_file.namelist())
namelist = zip_file.namelist()
if len(namelist) > 1:
print(namelist)
for name in namelist:
with zip_file.open(name) as zipped_img:
im = Image.open(zipped_img)
buffered = BytesIO()
im.save(buffered, format="JPEG")
im_str = base64.b64encode(buffered.getvalue())
print(f'{im_str}\n')

assert len(zip_file.namelist()) == 1
name = zip_file.namelist()[0]
assert name == "000000.tif" if chunk_quality == "original" else "000000.jpeg"
Expand Down
Loading