Skip to content

Commit

Permalink
Removed unittest mock
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Dec 12, 2024
1 parent 524d802 commit 35fe83b
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Tests/test_file_avif.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from pathlib import Path
from struct import unpack
from typing import Any
from unittest import mock

import pytest

Expand Down Expand Up @@ -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()
Expand All @@ -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:
Expand Down

0 comments on commit 35fe83b

Please sign in to comment.