@@ -170,6 +170,7 @@ def test_multiblock_l_image():
170170 with pytest .raises (ValueError ):
171171 (schema , arr ) = img .__arrow_c_array__ ()
172172
173+
173174def test_multiblock_rgba_image ():
174175 block_size = Image .core .get_block_size ()
175176
@@ -191,6 +192,7 @@ def test_multiblock_l_schema():
191192 with pytest .raises (ValueError ):
192193 schema = img .__arrow_c_schema__ ()
193194
195+
194196def test_multiblock_rgba_schema ():
195197 block_size = Image .core .get_block_size ()
196198
@@ -199,7 +201,7 @@ def test_multiblock_rgba_schema():
199201 img = Image .new ("RGBA" , size , (128 , 127 , 126 , 125 ))
200202
201203 with pytest .raises (ValueError ):
202- schema = img .__arrow_c_schema__ ()
204+ schema = img .__arrow_c_schema__ ()
203205
204206
205207def test_singleblock_l_image ():
@@ -208,8 +210,8 @@ def test_singleblock_l_image():
208210 block_size = Image .core .get_block_size ()
209211
210212 # check a 2 block image in 4 channel mode
211- size = (4096 , 2 * (block_size // 4096 ))
212- img = Image .new ('L' , size , 128 )
213+ size = (4096 , 2 * (block_size // 4096 ))
214+ img = Image .new ("L" , size , 128 )
213215 assert img .im .isblock ()
214216
215217 (schema , arr ) = img .__arrow_c_array__ ()
@@ -218,13 +220,14 @@ def test_singleblock_l_image():
218220
219221 Image .core .set_use_block_allocator (0 )
220222
223+
221224def test_singleblock_rgba_image ():
222225 Image .core .set_use_block_allocator (1 )
223226 block_size = Image .core .get_block_size ()
224227
225228 # check a 2 block image in 4 channel mode
226- size = (4096 , (block_size // 4096 ) // 2 )
227- img = Image .new (' RGBA' , size , (128 ,127 ,126 ,125 ))
229+ size = (4096 , (block_size // 4096 ) // 2 )
230+ img = Image .new (" RGBA" , size , (128 , 127 , 126 , 125 ))
228231 assert img .im .isblock ()
229232
230233 (schema , arr ) = img .__arrow_c_array__ ()
@@ -238,23 +241,24 @@ def test_singleblock_l_schema():
238241 block_size = Image .core .get_block_size ()
239242
240243 # check a 2 block image in single channel mode
241- size = (4096 , 2 * block_size // 4096 )
242- img = Image .new ('L' , size , 128 )
244+ size = (4096 , 2 * block_size // 4096 )
245+ img = Image .new ("L" , size , 128 )
243246 assert img .im .isblock ()
244247
245248 schema = img .__arrow_c_schema__ ()
246249 assert schema
247250 Image .core .set_use_block_allocator (0 )
248251
252+
249253def test_singleblock_rgba_schema ():
250254 Image .core .set_use_block_allocator (1 )
251255 block_size = Image .core .get_block_size ()
252256
253257 # check a 2 block image in 4 channel mode
254- size = (4096 , (block_size // 4096 ) // 2 )
255- img = Image .new (' RGBA' , size , (128 ,127 ,126 ,125 ))
258+ size = (4096 , (block_size // 4096 ) // 2 )
259+ img = Image .new (" RGBA" , size , (128 , 127 , 126 , 125 ))
256260 assert img .im .isblock ()
257261
258- schema = img .__arrow_c_schema__ ()
262+ schema = img .__arrow_c_schema__ ()
259263 assert schema
260264 Image .core .set_use_block_allocator (0 )
0 commit comments