File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -343,9 +343,10 @@ def delete_array_using_del(self, data: DataObject) -> None:
343343 @precondition (lambda self : len (self .all_groups ) >= 2 ) # fixme don't delete root
344344 @rule (data = st .data ())
345345 def delete_group_using_del (self , data : DataObject ) -> None :
346- group_path = data .draw (
347- st .sampled_from (sorted (self .all_groups )), label = "Group deletion target"
348- )
346+ # ensure that we don't include the root group in the list of member names that we try
347+ # to delete
348+ member_names = tuple (filter (lambda v : "/" in v , sorted (self .all_groups )))
349+ group_path = data .draw (st .sampled_from (member_names ), label = "Group deletion target" )
349350 prefix , group_name = split_prefix_name (group_path )
350351 note (f"Deleting group '{ group_path = !r} ', { prefix = !r} , { group_name = !r} using delete" )
351352 members = zarr .open_group (store = self .model , path = group_path ).members (max_depth = None )
You can’t perform that action at this time.
0 commit comments