mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
#3613: add base64.encodebytes and decodebytes as the new spelling of encodestring and decodestring; deprecate the latter.
This commit is contained in:
parent
cef803f82c
commit
b54d801280
6 changed files with 66 additions and 48 deletions
|
@ -232,7 +232,7 @@ class BinaryTestCase(unittest.TestCase):
|
|||
|
||||
def test_decode(self):
|
||||
d = b'\x01\x02\x03abc123\xff\xfe'
|
||||
de = base64.encodestring(d)
|
||||
de = base64.encodebytes(d)
|
||||
t1 = xmlrpclib.Binary()
|
||||
t1.decode(de)
|
||||
self.assertEqual(str(t1), str(d, "latin-1"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue