Skip to content

Commit 62f6f34

Browse files
committed
Document Group's move in the public API
1 parent 3c1eecf commit 62f6f34

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

docs/api/hierarchy.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@ Groups (``zarr.hierarchy``)
3636
.. automethod:: zeros_like
3737
.. automethod:: ones_like
3838
.. automethod:: full_like
39+
.. automethod:: move

zarr/tests/test_hierarchy.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,9 @@ def test_delitem(self):
688688
def test_move(self):
689689
g = self.create_group()
690690

691+
data = np.arange(100)
692+
g['boo'] = data
693+
691694
data = np.arange(100)
692695
g['foo'] = data
693696

@@ -719,6 +722,12 @@ def test_move(self):
719722
assert 'bar' in g
720723
assert isinstance(g['foo2'], Group)
721724
assert_array_equal(data, g['bar'])
725+
726+
with assert_raises(ValueError):
727+
g2.move('bar', 'bar2')
728+
729+
with assert_raises(ValueError):
730+
g.move('bar', 'boo')
722731
except NotImplementedError:
723732
pass
724733

0 commit comments

Comments
 (0)