Skip to content

Commit

Permalink
Simplified test
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Sep 5, 2024
1 parent 1ddeaa6 commit 6e973f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
Binary file removed Tests/images/exif2.jpg
Binary file not shown.
15 changes: 5 additions & 10 deletions Tests/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -776,17 +776,12 @@ def test_empty_exif(self) -> None:
assert not dict(exif)

def test_duplicate_exif_header(self) -> None:
with Image.open("Tests/images/exif2.jpg") as im:
exif = im.getexif()
assert dict(exif)

# Test that exif data is cleared after another load
exif.load(None)
assert not dict(exif)
with Image.open("Tests/images/exif.png") as im:
im.load()
im.info["exif"] = b"Exif\x00\x00" + im.info["exif"]

# Test loading just the EXIF header
exif.load(b"Exif\x00\x00Exif\x00\x00")
assert not dict(exif)
exif = im.getexif()
assert exif[274] == 1

def test_empty_get_ifd(self) -> None:
exif = Image.Exif()
Expand Down

0 comments on commit 6e973f4

Please sign in to comment.