Skip to content

Commit 73ad645

Browse files
authored
Merge pull request #33 from avalentino/bugfix/floating-point-comparison
Fix floating point comparison
2 parents d3f4750 + 64a4b47 commit 73ad645

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)