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 @@ -777,6 +777,19 @@ def test_a85decode_errors(self):
777777 self .assertRaises (ValueError , base64 .a85decode , b'aaaay' ,
778778 foldspaces = True )
779779
780+ self .assertEqual (base64 .a85decode (b"a b\n c" , ignorechars = b" \n " ),
781+ b'\xc9 \x89 ' )
782+ with self .assertRaises (ValueError ):
783+ base64 .a85decode (b"a b\n c" , ignorechars = b"" )
784+ with self .assertRaises (ValueError ):
785+ base64 .a85decode (b"a b\n c" , ignorechars = b" " )
786+ with self .assertRaises (ValueError ):
787+ base64 .a85decode (b"a b\n c" , ignorechars = b"\n " )
788+ with self .assertRaises (TypeError ):
789+ base64 .a85decode (b"a b\n c" , ignorechars = " \n " )
790+ with self .assertRaises (TypeError ):
791+ base64 .a85decode (b"a b\n c" , ignorechars = None )
792+
780793 def test_b85decode_errors (self ):
781794 illegal = list (range (33 )) + \
782795 list (b'"\' ,./:[\\ ]' ) + \
You can’t perform that action at this time.
0 commit comments