From: W. Trevor King Date: Mon, 22 Oct 2012 00:19:37 +0000 (-0400) Subject: mailpipe: fix _get_message_subject() doctest for "-ascii part". X-Git-Url: http://git.tremily.us/?p=pygrader.git;a=commitdiff_plain;h=c47bc820cb31db468b5eb84358bccde451a1252e 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 ;). --- 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)