Rearranged code

This commit is contained in:
Andrew Murray 2024-07-21 05:22:13 +10:00
parent f624460321
commit 1cf887dbec

View File

@ -241,10 +241,10 @@ class TestFileLibTiff(LibTiffTestCase):
new_ifd = TiffImagePlugin.ImageFileDirectory_v2()
for tag, info in core_items.items():
assert info.type is not None
if not info.length:
new_ifd[tag] = tuple(values[info.type] for _ in range(3))
elif info.length == 1:
if info.length == 1:
new_ifd[tag] = values[info.type]
elif not info.length:
new_ifd[tag] = tuple(values[info.type] for _ in range(3))
else:
new_ifd[tag] = tuple(values[info.type] for _ in range(info.length))