From d9ad19e86ff658a74870fb488cd74e5002b63bc3 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Sat, 18 Jul 2009 22:31:45 -0400 Subject: De-u-literal-ify our doctests. --- src/mailman/tests/test_documentation.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/mailman/tests/test_documentation.py') diff --git a/src/mailman/tests/test_documentation.py b/src/mailman/tests/test_documentation.py index 48b71d72c..0409e737c 100644 --- a/src/mailman/tests/test_documentation.py +++ b/src/mailman/tests/test_documentation.py @@ -69,16 +69,19 @@ class chdir: -def specialized_message_from_string(text): +def specialized_message_from_string(unicode_text): """Parse text into a message object. This is specialized in the sense that an instance of Mailman's own Message object is returned, and this message object has an attribute `original_size` which is the pre-calculated size in bytes of the message's text representation. + + Also, the text must be ASCII-only unicode. """ # This mimic what Switchboard.dequeue() does when parsing a message from # text into a Message instance. + text = unicode_text.encode('ascii') original_size = len(text) message = message_from_string(text, Message) message.original_size = original_size -- cgit v1.2.3-70-g09d2