| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| 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. | |||
| 254 | 254 | *adobe* controls whether the input sequence is in Adobe Ascii85 format | |
| 255 | 255 | (i.e. is framed with <~ and ~>). | |
| 256 | 256 | ||
| 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 | ||
| 259 | 258 | from the input. This should only contain whitespace characters, and by | |
| 260 | 259 | default contains all whitespace characters in ASCII. | |
| 261 | 260 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -965,6 +965,19 @@ def test_a85decode_errors(self): | |||
| 965 | 965 | self.assertRaises(ValueError, base64.a85decode, b'aaaay', | |
| 966 | 966 | foldspaces=True) | |
| 967 | 967 | ||
| 968 | + self.assertEqual(base64.a85decode(b"a b\nc", ignorechars=b" \n"), | ||
| 969 | + b'\xc9\x89') | ||
| 970 | + with self.assertRaises(ValueError): | ||
| 971 | + base64.a85decode(b"a b\nc", ignorechars=b"") | ||
| 972 | + with self.assertRaises(ValueError): | ||
| 973 | + base64.a85decode(b"a b\nc", ignorechars=b" ") | ||
| 974 | + with self.assertRaises(ValueError): | ||
| 975 | + base64.a85decode(b"a b\nc", ignorechars=b"\n") | ||
| 976 | + with self.assertRaises(TypeError): | ||
| 977 | + base64.a85decode(b"a b\nc", ignorechars=" \n") | ||
| 978 | + with self.assertRaises(TypeError): | ||
| 979 | + base64.a85decode(b"a b\nc", ignorechars=None) | ||
| 980 | + | ||
| 968 | 981 | def test_b85decode_errors(self): | |
| 969 | 982 | illegal = list(range(33)) + \ | |
| 970 | 983 | list(b'"\',./:[\\]') + \ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments