summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>2019-09-25 10:13:17 +0200
committerPicca Frédéric-Emmanuel <picca@debian.org>2019-09-25 10:13:17 +0200
commit45caffab5c841ddca7c79edba7eccbb6db263947 (patch)
tree18e3f99a05c3744dda2bfb0c28f3e797152877d3
parentd85b8464bc3c7d141476448fda03fc07404e3771 (diff)
test_split_bbox_2d-fix_zero_testarchive/debian/0.18.0+dfsg1-3_bpo10+1
=================================================================== Gbp-Pq: Name test_split_bbox_2d-fix_zero_test.patch
-rw-r--r--pyFAI/test/test_split_pixel.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyFAI/test/test_split_pixel.py b/pyFAI/test/test_split_pixel.py
index c1ff035..185bfff 100644
--- a/pyFAI/test/test_split_pixel.py
+++ b/pyFAI/test/test_split_pixel.py
@@ -202,15 +202,15 @@ class TestSplitBBoxNg(unittest.TestCase):
print("pos0", self.results["histoBBox2d_ng"][2])
print("err", self.results["histoBBox2d_ng"][1])
print("int", self.results["histoBBox2d_ng"][0])
- self.assertEqual(abs(count_legacy - count_ng).max(), 0, "count is the same")
+ self.assertTrue(numpy.allclose(abs(count_legacy - count_ng).max(), 0), "count is the same")
# same for normalisation ... in this case
count_ng = self.results["histoBBox2d_ng"][4]["norm"]
- self.assertEqual(abs(count_legacy - count_ng).max(), 0, "norm is old-count")
+ self.assertTrue(numpy.allclose(abs(count_legacy - count_ng).max(), 0), "norm is old-count")
# Weighted signal:
weighted_legacy = self.results["histoBBox2d_legacy"][3]
signal = self.results["histoBBox2d_ng"][4]["signal"]
- self.assertEqual(abs(signal - weighted_legacy).max(), 0, "Weighted is the same")
+ self.assertTrue(numpy.allclose(abs(signal - weighted_legacy).max(), 0), "Weighted is the same")
# resulting intensity validation
int_legacy = self.results["histoBBox2d_legacy"][0]