[python-hdf5storage] 59/152: Fixed issue in test where NaN's were causing equality tests to fail.
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Feb 29 08:24:34 UTC 2016
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to annotated tag 0.1
in repository python-hdf5storage.
commit 927e5b24b6d1891e2f29c401a00efadcbaffb110
Author: Freja Nordsiek <fnordsie at gmail.com>
Date: Wed Jan 29 23:35:28 2014 -0500
Fixed issue in test where NaN's were causing equality tests to fail.
---
tests/test_write_readback.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tests/test_write_readback.py b/tests/test_write_readback.py
index 41a719c..f11ad27 100755
--- a/tests/test_write_readback.py
+++ b/tests/test_write_readback.py
@@ -89,8 +89,9 @@ class TestWriteReadbackCpythonMatlab(unittest.TestCase):
self.assertEqual(a, b)
def assert_equal_numpy(self, a, b):
- self.assertTrue(type(a) == type(b) and a.dtype == b.dtype
- and a.shape == b.shape and np.all(a == b))
+ self.assertTrue(type(a) == type(b) and a.dtype == b.dtype \
+ and a.shape == b.shape and np.all((a == b) \
+ | (np.isnan(a) & np.isnan(b))))
def test_None(self):
data = None
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-hdf5storage.git
More information about the debian-science-commits
mailing list