Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bd961ed

Browse files
committed
added required shape arguments
1 parent 41b2e5f commit bd961ed

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

h5py/tests/test_group.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -164,16 +164,16 @@ def test_intermediate_create_group(self):
164164
assert isinstance(group, Group)
165165

166166
def test_require_shape(self):
167-
ds = self.f.require_dataset("foo/resizable", maxshape=(None, 3), dtype=int)
167+
ds = self.f.require_dataset("foo/resizable", shape=(0, 3), maxshape=(None, 3), dtype=int)
168168
ds.resize(20, axis=0)
169-
self.f.require_dataset("foo/resizable", maxshape=(None, 3), dtype=int)
169+
self.f.require_dataset("foo/resizable", shape=(0, 3), maxshape=(None, 3), dtype=int)
170170
self.f.require_dataset("foo/resizable", shape=(20, 3), dtype=int)
171171
with self.assertRaises(TypeError):
172-
self.f.require_dataset("foo/resizable", maxshape=(3, None), dtype=int)
172+
self.f.require_dataset("foo/resizable", shape=(0, 0), maxshape=(3, None), dtype=int)
173173
with self.assertRaises(TypeError):
174-
self.f.require_dataset("foo/resizable", maxshape=(None, 5), dtype=int)
174+
self.f.require_dataset("foo/resizable", shape=(0, 0), maxshape=(None, 5), dtype=int)
175175
with self.assertRaises(TypeError):
176-
self.f.require_dataset("foo/resizable", maxshape=(None, 5, 2), dtype=int)
176+
self.f.require_dataset("foo/resizable", shape=(0, 0), maxshape=(None, 5, 2), dtype=int)
177177
with self.assertRaises(TypeError):
178178
self.f.require_dataset("foo/resizable", shape=(10, 3), dtype=int)
179179

0 commit comments

Comments
 (0)