mirror of
https://github.com/python/cpython.git
synced 2025-10-06 15:11:58 +00:00
Allow developers to not have to either test on N Python versions or
looked through multiple versions of the docs to know whether they can
easily update.
(cherry picked from commit c643a967dd
)
This commit is contained in:
parent
2adc668481
commit
c7ff163abf
3 changed files with 25 additions and 6 deletions
|
@ -18,6 +18,14 @@ class LegacyBase64TestCase(unittest.TestCase):
|
|||
int_data = memoryview(b"1234").cast('I')
|
||||
self.assertRaises(TypeError, f, int_data)
|
||||
|
||||
def test_encodestring_warns(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
base64.encodestring(b"www.python.org")
|
||||
|
||||
def test_decodestring_warns(self):
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
base64.decodestring(b"d3d3LnB5dGhvbi5vcmc=\n")
|
||||
|
||||
def test_encodebytes(self):
|
||||
eq = self.assertEqual
|
||||
eq(base64.encodebytes(b"www.python.org"), b"d3d3LnB5dGhvbi5vcmc=\n")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue