File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -254,8 +254,7 @@ Refer to the documentation of the individual functions for more information.
254254 *adobe * controls whether the input sequence is in Adobe Ascii85 format
255255 (i.e. is framed with <~ and ~>).
256256
257- *ignorechars * should be a :term: `bytes-like object ` or ASCII string
258- containing characters to ignore
257+ *ignorechars * should be a byte string containing characters to ignore
259258 from the input. This should only contain whitespace characters, and by
260259 default contains all whitespace characters in ASCII.
261260
Original file line number Diff line number Diff line change @@ -965,6 +965,19 @@ def test_a85decode_errors(self):
965965 self .assertRaises (ValueError , base64 .a85decode , b'aaaay' ,
966966 foldspaces = True )
967967
968+ self .assertEqual (base64 .a85decode (b"a b\n c" , ignorechars = b" \n " ),
969+ b'\xc9 \x89 ' )
970+ with self .assertRaises (ValueError ):
971+ base64 .a85decode (b"a b\n c" , ignorechars = b"" )
972+ with self .assertRaises (ValueError ):
973+ base64 .a85decode (b"a b\n c" , ignorechars = b" " )
974+ with self .assertRaises (ValueError ):
975+ base64 .a85decode (b"a b\n c" , ignorechars = b"\n " )
976+ with self .assertRaises (TypeError ):
977+ base64 .a85decode (b"a b\n c" , ignorechars = " \n " )
978+ with self .assertRaises (TypeError ):
979+ base64 .a85decode (b"a b\n c" , ignorechars = None )
980+
968981 def test_b85decode_errors (self ):
969982 illegal = list (range (33 )) + \
970983 list (b'"\' ,./:[\\ ]' ) + \
You can’t perform that action at this time.
0 commit comments