Skip to content

Commit 4dd8857

Browse files
committed
Fix incorrect group attribute update tests
1 parent 0962049 commit 4dd8857

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_group.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,10 @@ def test_group_update_attributes(store: Store, zarr_format: ZarrFormat) -> None:
604604
assert group.attrs == attrs
605605
new_attrs = {"bar": 100}
606606
new_group = group.update_attributes(new_attrs)
607-
assert new_group.attrs == new_attrs
607+
608+
updated_attrs = attrs.copy()
609+
updated_attrs.update(new_attrs)
610+
assert new_group.attrs == updated_attrs
608611

609612

610613
async def test_group_update_attributes_async(store: Store, zarr_format: ZarrFormat) -> None:
@@ -1008,7 +1011,9 @@ async def test_asyncgroup_update_attributes(store: Store, zarr_format: ZarrForma
10081011
)
10091012

10101013
agroup_new_attributes = await agroup.update_attributes(attributes_new)
1011-
assert agroup_new_attributes.attrs == attributes_new
1014+
attributes_updated = attributes_old.copy()
1015+
attributes_updated.update(attributes_new)
1016+
assert agroup_new_attributes.attrs == attributes_updated
10121017

10131018

10141019
@pytest.mark.parametrize("store", ["local"], indirect=["store"])

0 commit comments

Comments
 (0)