Skip to content

Commit 3da306f

Browse files
committed
Remove spaces around unit test docstrings.
No need to continue following h5py's code styling rules.
1 parent c5b4214 commit 3da306f

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Diff for: b2h5py/tests/test_slicing_blosc2.py

+16-16
Original file line numberDiff line numberDiff line change
@@ -91,31 +91,31 @@ def test(self):
9191

9292
@check_opt_slicing
9393
def test_whole_array(self):
94-
""" Reading a slice covering the whole array """
94+
"""Reading a slice covering the whole array"""
9595
self.assertArrayEqual(self.dset[:], self.arr)
9696

9797
@check_opt_slicing
9898
def test_cross_chunk_1dim(self):
99-
""" Reading a slice crossing chunk boundaries (1-dim) """
99+
"""Reading a slice crossing chunk boundaries (1-dim)"""
100100
slc = slice(self.dset.chunks[0] - 5, self.dset.chunks[0] + 5)
101101
self.assertArrayEqual(self.dset[slc], self.arr[slc])
102102

103103
@check_opt_slicing
104104
def test_cross_chunk_ndim(self):
105-
""" Reading a slice crossing chunk boundaries (n-dim) """
105+
"""Reading a slice crossing chunk boundaries (n-dim)"""
106106
slc = (slice(self.dset.chunks[0] - 5, self.dset.chunks[0] + 5),
107107
slice(self.dset.chunks[1] - 5, self.dset.chunks[1] + 5))
108108
self.assertArrayEqual(self.dset[slc], self.arr[slc])
109109

110110
@check_opt_slicing
111111
def test_last_chunk_1dim(self):
112-
""" Reading a slice going past the last chunk (1-dim) """
112+
"""Reading a slice going past the last chunk (1-dim)"""
113113
slc = slice(self.dset.shape[0] - 5, self.dset.shape[0] + 5)
114114
self.assertArrayEqual(self.dset[slc], self.arr[slc])
115115

116116
@check_opt_slicing
117117
def test_last_chunk_ndim(self):
118-
""" Reading a slice going past the last chunk (n-dim) """
118+
"""Reading a slice going past the last chunk (n-dim)"""
119119
slc = (slice(self.dset.shape[0] - 5, self.dset.shape[0] + 5),
120120
slice(self.dset.shape[1] - 5, self.dset.shape[1] + 5))
121121
self.assertArrayEqual(self.dset[slc], self.arr[slc])
@@ -124,13 +124,13 @@ def test_last_chunk_ndim(self):
124124

125125
@check_opt_slicing
126126
def test_scalar_inside(self):
127-
""" Reading a scalar inside of the array """
127+
"""Reading a scalar inside of the array"""
128128
coord = tuple(random.randrange(0, c) for c in self.dset.shape)
129129
self.assertEqual(self.dset[coord], self.arr[coord])
130130

131131
@check_opt_slicing
132132
def test_scalar_outside(self):
133-
""" Reading a scalar outside of the array """
133+
"""Reading a scalar outside of the array"""
134134
shape = self.dset.shape
135135
coords = [(shape[0] * 2, 0), (0, shape[1] * 2),
136136
tuple(c * 2 for c in shape)]
@@ -140,7 +140,7 @@ def test_scalar_outside(self):
140140

141141
@check_opt_slicing
142142
def test_slice_outside(self):
143-
""" Reading a slice outside of the array (empty) """
143+
"""Reading a slice outside of the array (empty)"""
144144
shape = self.dset.shape
145145
slcs = [(slice(shape[0] * 2, shape[0] * 3), ...),
146146
(..., slice(shape[1] * 2, shape[1] * 3)),
@@ -150,14 +150,14 @@ def test_slice_outside(self):
150150

151151
@check_opt_slicing
152152
def test_slice_1dimless(self):
153-
""" Reading a slice with one dimension less than the array """
153+
"""Reading a slice with one dimension less than the array"""
154154
idxs = [random.randrange(0, dim) for dim in self.dset.shape]
155155
for idx in idxs:
156156
self.assertArrayEqual(self.dset[idx], self.arr[idx])
157157

158158
@check_opt_slicing
159159
def test_astype(self):
160-
""" Reading a slice converted to another type """
160+
"""Reading a slice converted to another type"""
161161
alt_dtype = np.dtype('u4')
162162
self.assertTrue(self.dset.dtype < alt_dtype)
163163
alt_arr = self.arr.astype(alt_dtype)
@@ -220,7 +220,7 @@ def should_enable_opt(self):
220220

221221
@check_opt_slicing
222222
def test_slice(self):
223-
""" Reading a slice perpendicular to chunks """
223+
"""Reading a slice perpendicular to chunks"""
224224
slc = (slice(1, 2), slice(0, 2), slice(0, 2))
225225
self.assertArrayEqual(self.dset[slc], self.arr[slc])
226226

@@ -252,12 +252,12 @@ def should_enable_opt(self):
252252

253253
@check_opt_slicing
254254
def test_whole_array(self):
255-
""" Reading a slice covering the whole array """
255+
"""Reading a slice covering the whole array"""
256256
self.assertArrayEqual(self.dset[:], self.arr)
257257

258258
@check_opt_slicing
259259
def test_chunk(self):
260-
""" Reading a slice matching a chunk """
260+
"""Reading a slice matching a chunk"""
261261
slcs = [tuple(slice(mult * cl, (mult + 1) * cl)
262262
for cl in self.dset.chunks)
263263
for mult in range(3)]
@@ -266,20 +266,20 @@ def test_chunk(self):
266266

267267
@check_opt_slicing
268268
def test_cross_chunk(self):
269-
""" Reading a slice crossing chunk boundaries """
269+
"""Reading a slice crossing chunk boundaries"""
270270
slc = (slice(1, 1), slice(3, 3))
271271
self.assertArrayEqual(self.dset[slc], self.arr[slc])
272272

273273
@check_opt_slicing
274274
def test_last_chunk(self):
275-
""" Reading a slice going past the last chunk """
275+
"""Reading a slice going past the last chunk"""
276276
slc = (slice(-1, self.dset.shape[0] + 10),
277277
slice(-1, self.dset.shape[1] + 10))
278278
self.assertArrayEqual(self.dset[slc], self.arr[slc])
279279

280280
@check_opt_slicing
281281
def test_cross_last_chunk(self):
282-
""" Reading a slice crossing chunk boundaries past last chunk """
282+
"""Reading a slice crossing chunk boundaries past last chunk"""
283283
slc = (slice(-2, self.dset.shape[0] + 10),
284284
slice(-2, self.dset.shape[1] + 10))
285285
self.assertArrayEqual(self.dset[slc], self.arr[slc])

0 commit comments

Comments
 (0)