Ensure reset after test failure

Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
This commit is contained in:
Andrew Murray 2021-10-14 08:09:36 +11:00 committed by GitHub
parent 0b7fcbbc93
commit 1140f6538d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -992,9 +992,10 @@ class TestFileLibTiff(LibTiffTestCase):
out = str(tmp_path / "temp.tif") out = str(tmp_path / "temp.tif")
TiffImagePlugin.STRIP_SIZE = 2 ** 18 TiffImagePlugin.STRIP_SIZE = 2 ** 18
try:
im.save(out, compression="tiff_adobe_deflate") im.save(out, compression="tiff_adobe_deflate")
try:
with Image.open(out) as im: with Image.open(out) as im:
assert len(im.tag_v2[STRIPOFFSETS]) == 1 assert len(im.tag_v2[STRIPOFFSETS]) == 1
finally: finally: