From 1cf887dbec2387d1e3228497cc12329bf84d18e5 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 21 Jul 2024 05:22:13 +1000 Subject: [PATCH] Rearranged code --- Tests/test_file_libtiff.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/test_file_libtiff.py b/Tests/test_file_libtiff.py index 58ac705c9..62f8719af 100644 --- a/Tests/test_file_libtiff.py +++ b/Tests/test_file_libtiff.py @@ -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))