TEST: fix group selection for delete#3707
TEST: fix group selection for delete#3707ianhi wants to merge 2 commits intozarr-developers:mainfrom
Conversation
|
small correciton. root should never be there, but nothign was explcitly disallowing. so i updated the sampling to preclude it. |
|
|
||
| @precondition(lambda self: self.store.supports_deletes) | ||
| @precondition(lambda self: len(self.all_groups) >= 2) # fixme don't delete root | ||
| @precondition(lambda self: bool(self.all_groups - {"", "/"})) |
There was a problem hiding this comment.
I'm pretty sure the root group gets put there as "", or at least i think i remember that happening.
There was a problem hiding this comment.
looking again i might have been confused by this:
zarr-python/src/zarr/testing/stateful.py
Lines 112 to 115 in 23596c1
beceuase we strip the / at the start of paths i was worried that root might end up there as an empty string.
There was a problem hiding this comment.
IIRC it should be "/", so I prefer not filtering for ""
There was a problem hiding this comment.
the name of the root group is the empty string "". You probably get the same thing with "/", but that's technically the root group + a separator.
There was a problem hiding this comment.
so maybe we only filter for ""?
There was a problem hiding this comment.
sounds right but please confirm what's inserted in the bundle; we should only filter for one.
Fix stateful test delete group precondition. This was excluding any groups at the root level, which can lead to a hypothesis error if you have these three groups
/,0,1because all of those were being excluded. the root group is nver inall_groupsso this change should be safe to just select from all of them.