File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -340,13 +340,12 @@ def delete_array_using_del(self, data: DataObject) -> None:
340340 self .all_arrays .remove (array_path )
341341
342342 @precondition (lambda self : self .store .supports_deletes )
343- @precondition (lambda self : len (self .all_groups ) >= 2 ) # fixme don't delete root
343+ @precondition (lambda self : bool (self .all_groups ))
344344 @rule (data = st .data ())
345345 def delete_group_using_del (self , data : DataObject ) -> None :
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" )
346+ group_path = data .draw (
347+ st .sampled_from (sorted (self .all_groups )), label = "Group deletion target"
348+ )
350349 prefix , group_name = split_prefix_name (group_path )
351350 note (f"Deleting group '{ group_path = !r} ', { prefix = !r} , { group_name = !r} using delete" )
352351 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