Skip to content

Commit 65a2e81

Browse files
committed
fix build breakage with h5py 2.6.0
1 parent a4e5746 commit 65a2e81

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/unit/hdf5dbTest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,13 @@ def testWriteCommittedCompoundType(self):
943943
self.assertEqual(len(fields), 4)
944944
# todo - the last field class should be H5T_STRING, but it is getting
945945
# saved to HDF5 as Opaque - see: https://github.com/h5py/h5py/issues/613
946-
field_classes = ('H5T_INTEGER', 'H5T_FLOAT', 'H5T_STRING', 'H5T_OPAQUE')
946+
# this is fixed in h5py v. 2.6.0 - check the version until 2.6.0 becomes
947+
# available via pip and anaconda.
948+
import h5py
949+
if h5py.version.version_tuple[1] >= 6:
950+
field_classes = ('H5T_INTEGER', 'H5T_FLOAT', 'H5T_STRING', 'H5T_OPAQUE')
951+
else:
952+
field_classes = ('H5T_INTEGER', 'H5T_FLOAT', 'H5T_STRING', 'H5T_OPAQUE')
947953
for i in range(4):
948954
field = fields[i]
949955
self.assertEqual(field['name'], 'field_' + str(i+1))

0 commit comments

Comments
 (0)