@@ -507,14 +507,37 @@ def testCreateCommittedCompoundTypeDataset(self):
507
507
508
508
509
509
def testReadZeroDimDataset (self ):
510
- filepath = getFile ('zerodim.h5' , 'readzerodeimdataset.h5' )
511
- d111_values = None
512
- d112_values = None
513
- with Hdf5db (filepath , app_logger = self .log ) as db :
510
+ filepath = getFile ('zerodim.h5' , 'readzerodeimdataset.h5' )
511
+
512
+ with Hdf5db (filepath , app_logger = self .log ) as db :
514
513
dsetUuid = db .getUUIDByPath ('/dset' )
515
514
self .assertEqual (len (dsetUuid ), UUID_LEN )
516
515
dset_value = db .getDatasetValuesByUuid (dsetUuid )
517
516
self .assertEqual (dset_value , 42 )
517
+
518
+
519
+ def testReadNullSpaceDataset (self ):
520
+ filepath = getFile ('null_space_dset.h5' , 'readnullspacedataset.h5' )
521
+
522
+ with Hdf5db (filepath , app_logger = self .log ) as db :
523
+ dsetUuid = db .getUUIDByPath ('/DS1' )
524
+ self .assertEqual (len (dsetUuid ), UUID_LEN )
525
+ obj = db .getDatasetObjByUuid (dsetUuid )
526
+ shape_item = db .getShapeItemByDsetObj (obj )
527
+ self .assertTrue ('class' in shape_item )
528
+ self .assertEqual (shape_item ['class' ], 'H5S_NULL' )
529
+
530
+ def testReadNullSpaceAttribute (self ):
531
+ filepath = getFile ('null_space_attr.h5' , 'readnullspaceattr.h5' )
532
+
533
+ with Hdf5db (filepath , app_logger = self .log ) as db :
534
+ rootUuid = db .getUUIDByPath ('/' )
535
+ self .assertEqual (len (rootUuid ), UUID_LEN )
536
+ item = db .getAttributeItem ("groups" , rootUuid , "attr1" )
537
+ self .assertTrue ('shape' in item )
538
+ shape_item = item ['shape' ]
539
+ self .assertTrue ('class' in shape_item )
540
+ self .assertEqual (shape_item ['class' ], 'H5S_NULL' )
518
541
519
542
def testReadAttribute (self ):
520
543
# getAttributeItemByUuid
0 commit comments