Skip to content

Commit

Permalink
Fix floating point comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
avalentino committed Dec 9, 2023
1 parent d66bfb3 commit 48ae2d2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyninjotiff/tests/test_ninjotiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,10 @@ def test_write_rgb_tb():
for key, val in tags.items():
if key in ['datetime', '40002', '40003', '40006']:
continue
assert(val == read_tags[key].value)
if hasattr(val, "dtype") and val.dtype.kinf == "f":
np.testing.assert_allclose(val, read_tags[key].value)
else:
assert(val == read_tags[key].value)


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

0 comments on commit 48ae2d2

Please sign in to comment.