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 @@ -246,8 +246,7 @@ Refer to the documentation of the individual functions for more information.
246246 *adobe * controls whether the input sequence is in Adobe Ascii85 format
247247 (i.e. is framed with <~ and ~>).
248248
249- *ignorechars * should be a :term: `bytes-like object ` or ASCII string
250- containing characters to ignore
249+ *ignorechars * should be a byte string containing characters to ignore
251250 from the input. This should only contain whitespace characters, and by
252251 default contains all whitespace characters in ASCII.
253252
Original file line number Diff line number Diff line change @@ -948,6 +948,19 @@ def test_a85decode_errors(self):
948948 self .assertRaises (ValueError , base64 .a85decode , b'aaaay' ,
949949 foldspaces = True )
950950
951+ self .assertEqual (base64 .a85decode (b"a b\n c" , ignorechars = b" \n " ),
952+ b'\xc9 \x89 ' )
953+ with self .assertRaises (ValueError ):
954+ base64 .a85decode (b"a b\n c" , ignorechars = b"" )
955+ with self .assertRaises (ValueError ):
956+ base64 .a85decode (b"a b\n c" , ignorechars = b" " )
957+ with self .assertRaises (ValueError ):
958+ base64 .a85decode (b"a b\n c" , ignorechars = b"\n " )
959+ with self .assertRaises (TypeError ):
960+ base64 .a85decode (b"a b\n c" , ignorechars = " \n " )
961+ with self .assertRaises (TypeError ):
962+ base64 .a85decode (b"a b\n c" , ignorechars = None )
963+
951964 def test_b85decode_errors (self ):
952965 illegal = list (range (33 )) + \
953966 list (b'"\' ,./:[\\ ]' ) + \
You can’t perform that action at this time.
0 commit comments