Skip to content

Commit

Permalink
Moved test
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 20, 2024
1 parent cb1653f commit 925db45
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 25 deletions.
19 changes: 19 additions & 0 deletions Tests/test_file_libtiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -1098,6 +1098,25 @@ def test_exif_transpose(self) -> None:

assert_image_similar(base_im, im, 0.7)

@pytest.mark.parametrize(
"test_file",
[
"Tests/images/old-style-jpeg-compression-no-samplesperpixel.tif",
"Tests/images/old-style-jpeg-compression.tif",
],
)
def test_buffering(self, test_file: str) -> None:
# load exif first
with Image.open(open(test_file, "rb", buffering=1048576)) as im:
exif = dict(im.getexif())

# load image before exif
with Image.open(open(test_file, "rb", buffering=1048576)) as im2:
im2.load()
exif_after_load = dict(im2.getexif())

assert exif == exif_after_load

@pytest.mark.valgrind_known_error(reason="Backtrace in Python Core")
def test_sampleformat_not_corrupted(self) -> None:
# Assert that a TIFF image with SampleFormat=UINT tag is not corrupted
Expand Down
25 changes: 0 additions & 25 deletions Tests/test_libtiff_file_position.py

This file was deleted.

0 comments on commit 925db45

Please sign in to comment.