Skip to content
Snippets Groups Projects
Verified Commit c05d0de2 authored by Alexander Kreft's avatar Alexander Kreft
Browse files

TST: adding tests for h5 - scalar attributes

parent 94ae2395
No related branches found
No related tags found
2 merge requests!22Release 0.3,!18Improved the handling of numpy scalars in cfoods.h5.h5_attr_to_property
This commit is part of merge request !18. Comments created here will be created in the context of that merge request.
......@@ -181,4 +181,7 @@ class H5CFoodTest(unittest.TestCase):
self.assertTupleEqual((None, None), h5_attr_to_property(test_integers_2d))
self.assertTupleEqual((None, None), h5_attr_to_property(test_floats_2d))
self.assertRaises(NotImplementedError, h5_attr_to_property, np.array(1))
# Test scalar values given as np.array
self.assertTupleEqual((1, db.INTEGER), h5_attr_to_property(np.array(1)))
self.assertTupleEqual((1.123, db.DOUBLE), h5_attr_to_property(np.array(1.123)))
self.assertTupleEqual(('Hello World', db.TEXT), h5_attr_to_property(np.array("Hello World")))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment