mailpipe: fix _get_message_subject() doctest for "-ascii part".
authorW. Trevor King <wking@tremily.us>
Mon, 22 Oct 2012 00:19:37 +0000 (20:19 -0400)
committerW. Trevor King <wking@tremily.us>
Mon, 22 Oct 2012 00:19:37 +0000 (20:19 -0400)
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

index 90d1bcb903f51cad7286411ac7b083b61b0b5d0c..02e8955d2d3f80e5843a089e5528e019aa8789a8 100644 (file)
@@ -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)