Commit 532653d 1 parent fc357ed commit 532653d Copy full SHA for 532653d
File tree 3 files changed +9
-9
lines changed
3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -317,12 +317,12 @@ def test_grayscale_four_channels() -> None:
317
317
with open ("Tests/images/rgb_trns_ycbc.jp2" , "rb" ) as fp :
318
318
data = fp .read ()
319
319
320
- # Change color space to OPJ_CLRSPC_GRAY
321
- data = data [:76 ] + b"\x11 " + data [77 :]
320
+ # Change color space to OPJ_CLRSPC_GRAY
321
+ data = data [:76 ] + b"\x11 " + data [77 :]
322
322
323
- with Image .open (BytesIO (data )) as im :
324
- im .load ()
325
- assert im .mode == "RGBA"
323
+ with Image .open (BytesIO (data )) as im :
324
+ im .load ()
325
+ assert im .mode == "RGBA"
326
326
327
327
328
328
@pytest .mark .skipif (
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def test_sanity(tmp_path: Path) -> None:
40
40
def test_bad_image_size () -> None :
41
41
with open ("Tests/images/pil184.pcx" , "rb" ) as fp :
42
42
data = fp .read ()
43
- data = data [:4 ] + b"\xff \xff " + data [6 :]
43
+ data = data [:4 ] + b"\xff \xff " + data [6 :]
44
44
45
45
b = io .BytesIO (data )
46
46
with pytest .raises (SyntaxError , match = "bad PCX image size" ):
@@ -51,7 +51,7 @@ def test_bad_image_size() -> None:
51
51
def test_unknown_mode () -> None :
52
52
with open ("Tests/images/pil184.pcx" , "rb" ) as fp :
53
53
data = fp .read ()
54
- data = data [:3 ] + b"\xff " + data [4 :]
54
+ data = data [:3 ] + b"\xff " + data [4 :]
55
55
56
56
b = io .BytesIO (data )
57
57
with pytest .raises (OSError , match = "unknown PCX mode" ):
Original file line number Diff line number Diff line change @@ -20,8 +20,8 @@ def test_sanity() -> None:
20
20
def test_zero_width_chars () -> None :
21
21
with open (filename , "rb" ) as fp :
22
22
data = fp .read ()
23
- data = data [:2650 ] + b"\x00 \x00 " + data [2652 :]
24
- BdfFontFile .BdfFontFile (io .BytesIO (data ))
23
+ data = data [:2650 ] + b"\x00 \x00 " + data [2652 :]
24
+ BdfFontFile .BdfFontFile (io .BytesIO (data ))
25
25
26
26
27
27
def test_invalid_file () -> None :
You can’t perform that action at this time.
0 commit comments