From c47bc820cb31db468b5eb84358bccde451a1252e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 21 Oct 2012 20:19:37 -0400 Subject: [PATCH] mailpipe: fix _get_message_subject() doctest for "-ascii part". In both Python 3.2.3 and 3.3 the doctest subject is encoded as '=?utf-8?q?unicode_part?= -ascii part' In Python 3.3, this is now correctly decoded (I think) to retain the space. It seems to me that the encoded version should actually be: '=?utf-8?q?unicode_part?=-ascii part' but I don't care enough to track that down ;). --- pygrader/mailpipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygrader/mailpipe.py b/pygrader/mailpipe.py index 90d1bcb..02e8955 100644 --- a/pygrader/mailpipe.py +++ b/pygrader/mailpipe.py @@ -882,7 +882,7 @@ def _get_message_subject(message): >>> subject.append('-ascii part', 'ascii') >>> message['Subject'] = subject.encode() >>> _get_message_subject(message=message) - 'unicode part-ascii part' + 'unicode part -ascii part' >>> del message['Subject'] >>> message['Subject'] = 'clean subject' >>> _get_message_subject(message=message) -- 2.26.2