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 @@ -239,8 +239,7 @@ Refer to the documentation of the individual functions for more information.
239239 *adobe * controls whether the input sequence is in Adobe Ascii85 format
240240 (i.e. is framed with <~ and ~>).
241241
242- *ignorechars * should be a :term: `bytes-like object ` or ASCII string
243- containing characters to ignore
242+ *ignorechars * should be a byte string containing characters to ignore
244243 from the input. This should only contain whitespace characters, and by
245244 default contains all whitespace characters in ASCII.
246245
Original file line number Diff line number Diff line change @@ -785,6 +785,19 @@ def test_a85decode_errors(self):
785785 self .assertRaises (ValueError , base64 .a85decode , b'aaaay' ,
786786 foldspaces = True )
787787
788+ self .assertEqual (base64 .a85decode (b"a b\n c" , ignorechars = b" \n " ),
789+ b'\xc9 \x89 ' )
790+ with self .assertRaises (ValueError ):
791+ base64 .a85decode (b"a b\n c" , ignorechars = b"" )
792+ with self .assertRaises (ValueError ):
793+ base64 .a85decode (b"a b\n c" , ignorechars = b" " )
794+ with self .assertRaises (ValueError ):
795+ base64 .a85decode (b"a b\n c" , ignorechars = b"\n " )
796+ with self .assertRaises (TypeError ):
797+ base64 .a85decode (b"a b\n c" , ignorechars = " \n " )
798+ with self .assertRaises (TypeError ):
799+ base64 .a85decode (b"a b\n c" , ignorechars = None )
800+
788801 def test_b85decode_errors (self ):
789802 illegal = list (range (33 )) + \
790803 list (b'"\' ,./:[\\ ]' ) + \
You can’t perform that action at this time.
0 commit comments