From a56acd86c400bf474193b99778f48fcdfda52bdc Mon Sep 17 00:00:00 2001 From: Andrew Murray <3112309+radarhere@users.noreply.github.com> Date: Sat, 14 Dec 2024 02:44:38 +1100 Subject: [PATCH] Removed unittest mock (#10) * Removed unittest mock * Updated license * Increased timeout --------- Co-authored-by: Andrew Murray --- .github/workflows/test-windows.yml | 2 +- Tests/test_file_avif.py | 5 ----- wheels/dependency_licenses/LIBAVIF.txt | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-windows.yml b/.github/workflows/test-windows.yml index fab90454a54..83e01992754 100644 --- a/.github/workflows/test-windows.yml +++ b/.github/workflows/test-windows.yml @@ -37,7 +37,7 @@ jobs: matrix: python-version: ["pypy3.10", "3.9", "3.10", "3.11", "3.12", "3.13"] - timeout-minutes: 30 + timeout-minutes: 45 name: Python ${{ matrix.python-version }} diff --git a/Tests/test_file_avif.py b/Tests/test_file_avif.py index 1d56b3be0bf..1bc7299b62e 100644 --- a/Tests/test_file_avif.py +++ b/Tests/test_file_avif.py @@ -10,7 +10,6 @@ from pathlib import Path from struct import unpack from typing import Any -from unittest import mock import pytest @@ -334,12 +333,9 @@ def test_exif(self) -> None: def test_exif_save( self, tmp_path: Path, - monkeypatch: pytest.MonkeyPatch, bytes: bool, orientation: int, ) -> None: - mock_avif_encoder = mock.Mock(wraps=_avif.AvifEncoder) - monkeypatch.setattr(_avif, "AvifEncoder", mock_avif_encoder) exif = Image.Exif() exif[274] = orientation exif_data = exif.tobytes() @@ -352,7 +348,6 @@ def test_exif_save( assert "exif" not in reloaded.info else: assert reloaded.info["exif"] == exif_data - mock_avif_encoder.mock_calls[0].args[16:17] == (b"", orientation) def test_exif_invalid(self, tmp_path: Path) -> None: with Image.open(TEST_AVIF_FILE) as im: diff --git a/wheels/dependency_licenses/LIBAVIF.txt b/wheels/dependency_licenses/LIBAVIF.txt index 11bcb969bec..350eb9d15ce 100644 --- a/wheels/dependency_licenses/LIBAVIF.txt +++ b/wheels/dependency_licenses/LIBAVIF.txt @@ -51,7 +51,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ------------------------------------------------------------------------------ -Files: apps/shared/iccjpeg.* +Files: third_party/iccjpeg/* In plain English: