Tests failed with h5py-openmpi
Some test failures I noticed while building with system libraries in Arch Linux, which includes python-h5py-openmpi
self = <fluiddyn.io.test.test_hdf5.TestHdf5 testMethod=test_functions>
def test_functions(self):
path = "test_functions0.h5"
a = 1
b = "str"
c = np.ones(2)
d = 10
save_variables_h5(path, locals(), ("a", "b", "c"))
variables1 = load_variables_h5(path)
self.assertEqual(a, variables1["a"])
> self.assertEqual(b, variables1["b"])
E AssertionError: 'str' != b'str'
/home/avmo/.cache/aur/python-fluiddyn/src/fluiddyn-0.3.3/fluiddyn/io/test/test_hdf5.py:77: AssertionError
_____________________________________________________________________________ TestContainer.test_save_load_hdf5 _____________________________________________________________________________
self = <fluiddyn.util.test.test_paramcontainer.TestContainer testMethod=test_save_load_hdf5>
def test_save_load_hdf5(self):
"""Test save to and load from hdf5 file."""
params = self.params
name_file_h5 = "params_test.h5"
params._save_as_hdf5(path_file=name_file_h5)
params._save_as_hdf5()
params2 = ParamContainer(path_file=name_file_h5)
os.remove(name_file_h5)
try:
> self.assertEqual(self.params, params2)
/home/avmo/.cache/aur/python-fluiddyn/src/fluiddyn-0.3.3/fluiddyn/util/test/test_paramcontainer.py:85:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <fluiddyn.util.paramcontainer.ParamContainer object at 0x7fb3a3b9a550>
<params a0="1" a1="1" a2="a" a_str_list="['a', 'b']">
<child0 a0="[1]" a1="None">
<cc/>
</child0>
</params>
other = <fluiddyn.util.paramcontainer.ParamContainer object at 0x7fb3a3b9a580>
<params a0="1" a1="1" a2="a" a_str_list="array(['a', 'b'], dtype=object)">
<child0 a0="array([1])" a1="None">
<cc/>
</child0>
</params>
def __eq__(self, other):
> return self._make_dict() == other._make_dict()
E ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
/home/avmo/.cache/aur/python-fluiddyn/src/fluiddyn-0.3.3/fluiddyn/util/paramcontainer.py:392: ValueError