Skip to content

Commit 64a4b47

Browse files
committed
Fix floating point comparison
1 parent d66bfb3 commit 64a4b47

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyninjotiff/tests/test_ninjotiff.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,10 @@ def test_write_rgb_tb():
519519
for key, val in tags.items():
520520
if key in ['datetime', '40002', '40003', '40006']:
521521
continue
522-
assert(val == read_tags[key].value)
522+
if np.asarray(val).dtype.kind == "f":
523+
np.testing.assert_allclose(val, read_tags[key].value)
524+
else:
525+
assert(val == read_tags[key].value)
523526

524527

525528
@pytest.mark.skip(reason="this is no implemented yet.")

0 commit comments

Comments
 (0)