Skip to content

Commit 66ea27c

Browse files
committed
Record resolution instead of requiring ctypes
1 parent f442ae8 commit 66ea27c

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Tests/test_file_libtiff.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import os
55
import re
66
from collections import namedtuple
7-
from ctypes import c_float
87

98
import pytest
109

@@ -168,14 +167,11 @@ def test_write_metadata(self, tmp_path):
168167
val = original[tag]
169168
if tag.endswith("Resolution"):
170169
if legacy_api:
171-
assert (
172-
c_float(val[0][0] / val[0][1]).value
173-
== c_float(value[0][0] / value[0][1]).value
170+
assert val[0][0] / val[0][1] == (
171+
4294967295 / 113653537
174172
), f"{tag} didn't roundtrip"
175173
else:
176-
assert (
177-
c_float(val).value == c_float(value).value
178-
), f"{tag} didn't roundtrip"
174+
assert val == 37.79000115940079, f"{tag} didn't roundtrip"
179175
else:
180176
assert val == value, f"{tag} didn't roundtrip"
181177

0 commit comments

Comments
 (0)