Fix a more bytes/str confusion.
Use str.encode('raw-unicode-escape') consistently instead of bytes(string).
Remove the convert_eols argument from base64mime.decode(). This matches
previous API changes done to the quoprimime module.
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index fc8224a..981441c 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -2531,10 +2531,8 @@
def test_decode(self):
eq = self.assertEqual
- eq(base64mime.decode(''), '')
+ eq(base64mime.decode(''), b'')
eq(base64mime.decode('aGVsbG8='), b'hello')
- eq(base64mime.decode('aGVsbG8=', 'X'), b'hello')
- eq(base64mime.decode('aGVsbG8NCndvcmxk\n', 'X'), b'helloXworld')
def test_encode(self):
eq = self.assertEqual
@@ -2844,7 +2842,7 @@
def test_empty_header_encode(self):
h = Header()
self.assertEqual(h.encode(), '')
-
+
def test_header_ctor_default_args(self):
eq = self.ndiffAssertEqual
h = Header()