[Git][debian-gis-team/pyninjotiff][master] New 0001-Fix-floating-point-comparison.patch
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Dec 9 09:00:40 GMT 2023
Antonio Valentino pushed to branch master at Debian GIS Project / pyninjotiff
Commits:
227ced2b by Antonio Valentino at 2023-12-09T08:59:53+00:00
New 0001-Fix-floating-point-comparison.patch
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/0001-Fix-floating-point-comparison.patch
- + debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -13,6 +13,8 @@ pyninjotiff (0.4.0-3) UNRELEASED; urgency=medium
* debian/control:
- Use the <!nocheck> marker.
* Switch to autopkgtest-pkg-pybuild.
+ * debian/patches:
+ - New 0001-Fix-floating-point-comparison.patch.
-- Bas Couwenberg <sebastic at debian.org> Thu, 22 Dec 2022 10:01:47 +0100
=====================================
debian/patches/0001-Fix-floating-point-comparison.patch
=====================================
@@ -0,0 +1,25 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sat, 9 Dec 2023 08:31:40 +0000
+Subject: Fix floating point comparison
+
+Forwarded: https://github.com/pytroll/pyninjotiff/pull/33
+---
+ pyninjotiff/tests/test_ninjotiff.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/pyninjotiff/tests/test_ninjotiff.py b/pyninjotiff/tests/test_ninjotiff.py
+index 2d4f224..20c99fa 100644
+--- a/pyninjotiff/tests/test_ninjotiff.py
++++ b/pyninjotiff/tests/test_ninjotiff.py
+@@ -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.")
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+0001-Fix-floating-point-comparison.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyninjotiff/-/commit/227ced2b165e4d304531f5aaec1321377c63f345
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/pyninjotiff/-/commit/227ced2b165e4d304531f5aaec1321377c63f345
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20231209/b04c710f/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list