test_email testresult

cpu-mhz 1603.696
cpu-model AMD Opteron(tm) Processor 242
executable py.py
execution-time 1263.14689302
exit-status 1
fspath /home/hpk/pypy-dist/lib-python/2.4.1/test/test_email.py
options
outcome ERR
platform linux2
pypy-revision 27957
python-version-info (2, 4, 2, 'final', 0)
startdate Thu Jun 1 07:13:36 2006
testreport-version 1.1
timeout 1225.0
userhost hpk@cen01

stdout

test_decode (email.test.test_email.TestBase64) ... ok
test_encode (email.test.test_email.TestBase64) ... ok
test_header_encode (email.test.test_email.TestBase64) ... ok
test_len (email.test.test_email.TestBase64) ... ok
test_body_encode (email.test.test_email.TestCharset) ... ERROR
test_idempotent (email.test.test_email.TestCharset) ... ok
test_default_cte (email.test.test_email.TestEncoders) ... ERROR
test_encode_empty_payload (email.test.test_email.TestEncoders) ... ok
test_dont_mangle_from (email.test.test_email.TestFromMangling) ... ERROR
test_mangled_from (email.test.test_email.TestFromMangling) ... ERROR
test_bad_8bit_header (email.test.test_email.TestHeader) ... ERROR
test_broken_base64_header (email.test.test_email.TestHeader) ... FAIL
test_encoded_adjacent_nonencoded (email.test.test_email.TestHeader) ... ERROR
test_explicit_maxlinelen (email.test.test_email.TestHeader) ... ERROR
test_header_ctor_default_args (email.test.test_email.TestHeader) ... ERROR
test_header_needs_no_decoding (email.test.test_email.TestHeader) ... ok
test_long (email.test.test_email.TestHeader) ... ERROR
test_multilingual (email.test.test_email.TestHeader) ... ERROR
test_simple (email.test.test_email.TestHeader) ... ERROR
test_simple_surprise (email.test.test_email.TestHeader) ... ERROR
test_string_charset (email.test.test_email.TestHeader) ... ERROR
test_us_ascii_header (email.test.test_email.TestHeader) ... ERROR
test_utf8_shortest (email.test.test_email.TestHeader) ... ERROR
test_whitespace_eater (email.test.test_email.TestHeader) ... ERROR
test_MIME_digest (email.test.test_email.TestIdempotent) ... ok
test_MIME_digest_with_part_headers (email.test.test_email.TestIdempotent) ... ok
test_content_type (email.test.test_email.TestIdempotent) ... ok
test_dsn (email.test.test_email.TestIdempotent) ... ok
test_long_header (email.test.test_email.TestIdempotent) ... ok
test_message_external_body_idempotent (email.test.test_email.TestIdempotent) ... ok
test_mixed_with_image (email.test.test_email.TestIdempotent) ... ok
test_more_rfc2231_parameters (email.test.test_email.TestIdempotent) ... ok
test_multipart_no_parts (email.test.test_email.TestIdempotent) ... ok
test_multipart_one_part (email.test.test_email.TestIdempotent) ... ok
test_multipart_report (email.test.test_email.TestIdempotent) ... ok
test_nested_multipart_mixeds (email.test.test_email.TestIdempotent) ... ok
test_no_start_boundary (email.test.test_email.TestIdempotent) ... ok
test_parse_text_message (email.test.test_email.TestIdempotent) ... ok
test_parse_untyped_message (email.test.test_email.TestIdempotent) ... ok
test_parser (email.test.test_email.TestIdempotent) ... ok
test_preamble_epilogue (email.test.test_email.TestIdempotent) ... ok
test_rfc2231_charset (email.test.test_email.TestIdempotent) ... ok
test_simple_multipart (email.test.test_email.TestIdempotent) ... ok
test_text_plain_in_a_multipart_digest (email.test.test_email.TestIdempotent) ... ok
test_body_line_iterator (email.test.test_email.TestIterators) ... ok
test_typed_subpart_iterator (email.test.test_email.TestIterators) ... ok
test_typed_subpart_iterator_default_type (email.test.test_email.TestIterators) ... ok
test_another_long_almost_unsplittable_header (email.test.test_email.TestLongHeaders) ... ERROR
test_another_long_multiline_header (email.test.test_email.TestLongHeaders) ... ERROR
test_header_splitter (email.test.test_email.TestLongHeaders) ... ERROR
test_long_8bit_header (email.test.test_email.TestLongHeaders) ... ERROR
test_long_8bit_header_no_charset (email.test.test_email.TestLongHeaders) ... ok
test_long_field_name (email.test.test_email.TestLongHeaders) ... ERROR
test_long_header_encode (email.test.test_email.TestLongHeaders) ... ERROR
test_long_header_encode_with_tab_continuation (email.test.test_email.TestLongHeaders) ... ERROR
test_long_line_after_append (email.test.test_email.TestLongHeaders) ... ERROR
test_long_lines_with_different_header (email.test.test_email.TestLongHeaders) ... ERROR
test_long_nonstring (email.test.test_email.TestLongHeaders) ... ERROR
test_long_received_header (email.test.test_email.TestLongHeaders) ... ERROR
test_long_to_header (email.test.test_email.TestLongHeaders) ... ERROR
test_long_unbreakable_lines_with_continuation (email.test.test_email.TestLongHeaders) ... ERROR
test_no_semis_header_splitter (email.test.test_email.TestLongHeaders) ... ERROR
test_no_split_long_header (email.test.test_email.TestLongHeaders) ... ERROR
test_shorter_line_with_append (email.test.test_email.TestLongHeaders) ... ERROR
test_split_long_continuation (email.test.test_email.TestLongHeaders) ... ERROR
test_splitting_first_line_only_is_long (email.test.test_email.TestLongHeaders) ... ERROR
test_splitting_multiple_long_lines (email.test.test_email.TestLongHeaders) ... ERROR
test_string_headerinst_eq (email.test.test_email.TestLongHeaders) ... ERROR
test_add_header (email.test.test_email.TestMIMEAudio) ... ok
test_encoding (email.test.test_email.TestMIMEAudio) ... ok
test_guess_minor_type (email.test.test_email.TestMIMEAudio) ... ok
test_add_header (email.test.test_email.TestMIMEImage) ... ok
test_encoding (email.test.test_email.TestMIMEImage) ... ok
test_guess_minor_type (email.test.test_email.TestMIMEImage) ... ok
test_bad_multipart (email.test.test_email.TestMIMEMessage) ... ok
test_default_type (email.test.test_email.TestMIMEMessage) ... ok
test_default_type_non_parsed (email.test.test_email.TestMIMEMessage) ... ERROR
test_default_type_with_explicit_container_type (email.test.test_email.TestMIMEMessage) ... ok
test_dsn (email.test.test_email.TestMIMEMessage) ... ok
test_epilogue (email.test.test_email.TestMIMEMessage) ... ERROR
test_generate (email.test.test_email.TestMIMEMessage) ... ERROR
test_mime_attachments_in_constructor (email.test.test_email.TestMIMEMessage) ... ok
test_no_nl_preamble (email.test.test_email.TestMIMEMessage) ... ERROR
test_parse_message_rfc822 (email.test.test_email.TestMIMEMessage) ... ok
test_type_error (email.test.test_email.TestMIMEMessage) ... ok
test_valid_argument (email.test.test_email.TestMIMEMessage) ... ok
test_charset (email.test.test_email.TestMIMEText) ... ok
test_payload (email.test.test_email.TestMIMEText) ... ok
test_types (email.test.test_email.TestMIMEText) ... ok
test__contains__ (email.test.test_email.TestMessageAPI) ... ok
test_as_string (email.test.test_email.TestMessageAPI) ... ERROR
test_bad_param (email.test.test_email.TestMessageAPI) ... ok
test_bogus_filename (email.test.test_email.TestMessageAPI) ... ok
test_broken_base64_payload (email.test.test_email.TestMessageAPI) ... FAIL
test_decoded_generator (email.test.test_email.TestMessageAPI) ... ERROR
test_del_param (email.test.test_email.TestMessageAPI) ... ok
test_del_param_on_other_header (email.test.test_email.TestMessageAPI) ... ok
test_get_all (email.test.test_email.TestMessageAPI) ... ok
test_get_boundary (email.test.test_email.TestMessageAPI) ... ok
test_get_charsets (email.test.test_email.TestMessageAPI) ... ok
test_get_content_maintype_error (email.test.test_email.TestMessageAPI) ... ok
test_get_content_maintype_from_message_explicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_maintype_from_message_implicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_maintype_from_message_text_plain_explicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_maintype_from_message_text_plain_implicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_maintype_missing (email.test.test_email.TestMessageAPI) ... ok
test_get_content_maintype_missing_with_default_type (email.test.test_email.TestMessageAPI) ... ok
test_get_content_subtype_error (email.test.test_email.TestMessageAPI) ... ok
test_get_content_subtype_from_message_explicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_subtype_from_message_implicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_subtype_from_message_text_plain_explicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_subtype_from_message_text_plain_implicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_subtype_missing (email.test.test_email.TestMessageAPI) ... ok
test_get_content_subtype_missing_with_default_type (email.test.test_email.TestMessageAPI) ... ok
test_get_content_type_from_message_explicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_type_from_message_implicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_type_from_message_text_plain_explicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_type_from_message_text_plain_implicit (email.test.test_email.TestMessageAPI) ... ok
test_get_content_type_missing (email.test.test_email.TestMessageAPI) ... ok
test_get_content_type_missing_with_default_type (email.test.test_email.TestMessageAPI) ... ok
test_get_decoded_payload (email.test.test_email.TestMessageAPI) ... ok
test_get_decoded_uu_payload (email.test.test_email.TestMessageAPI) ... ok
test_get_filename (email.test.test_email.TestMessageAPI) ... ok
test_get_param (email.test.test_email.TestMessageAPI) ... ok
test_get_param_funky_continuation_lines (email.test.test_email.TestMessageAPI) ... ok
test_get_param_liberal (email.test.test_email.TestMessageAPI) ... ok
test_get_param_with_semis_in_quotes (email.test.test_email.TestMessageAPI) ... ok
test_get_params (email.test.test_email.TestMessageAPI) ... ok
test_getset_charset (email.test.test_email.TestMessageAPI) ... ok
test_has_key (email.test.test_email.TestMessageAPI) ... ok
test_missing_boundary (email.test.test_email.TestMessageAPI) ... ok
test_missing_filename (email.test.test_email.TestMessageAPI) ... ok
test_replace_header (email.test.test_email.TestMessageAPI) ... ok
test_set_boundary (email.test.test_email.TestMessageAPI) ... ok
test_set_charset_from_string (email.test.test_email.TestMessageAPI) ... ok
test_set_param (email.test.test_email.TestMessageAPI) ... ok
test_set_payload_with_charset (email.test.test_email.TestMessageAPI) ... ok
test_set_type (email.test.test_email.TestMessageAPI) ... ok
test_set_type_on_other_header (email.test.test_email.TestMessageAPI) ... ok
test__all__ (email.test.test_email.TestMiscellaneous) ... ok
test_charset_richcomparisons (email.test.test_email.TestMiscellaneous) ... ERROR
test_charsets_case_insensitive (email.test.test_email.TestMiscellaneous) ... ok
test_escape_backslashes (email.test.test_email.TestMiscellaneous) ... ok
test_escape_dump (email.test.test_email.TestMiscellaneous) ... ok
test_fix_eols (email.test.test_email.TestMiscellaneous) ... ok
test_formatdate (email.test.test_email.TestMiscellaneous) ... ok
test_formatdate_localtime (email.test.test_email.TestMiscellaneous) ... ok
test_formatdate_usegmt (email.test.test_email.TestMiscellaneous) ... ok
test_get_body_encoding_with_bogus_charset (email.test.test_email.TestMiscellaneous) ... ok
test_get_body_encoding_with_uppercase_charset (email.test.test_email.TestMiscellaneous) ... ok
test_getaddresses (email.test.test_email.TestMiscellaneous) ... ok
test_getaddresses_nasty (email.test.test_email.TestMiscellaneous) ... ok
test_message_from_file (email.test.test_email.TestMiscellaneous) ... ok
test_message_from_file_with_class (email.test.test_email.TestMiscellaneous) ... ok
test_message_from_string (email.test.test_email.TestMiscellaneous) ... ok
test_message_from_string_with_class (email.test.test_email.TestMiscellaneous) ... ok
test_name_with_dot (email.test.test_email.TestMiscellaneous) ... ok
test_noquote_dump (email.test.test_email.TestMiscellaneous) ... ok
test_parseaddr_empty (email.test.test_email.TestMiscellaneous) ... ok
test_parsedate_compact (email.test.test_email.TestMiscellaneous) ... ok
test_parsedate_compact_no_dayofweek (email.test.test_email.TestMiscellaneous) ... ok
test_parsedate_no_dayofweek (email.test.test_email.TestMiscellaneous) ... ok
test_parsedate_none (email.test.test_email.TestMiscellaneous) ... ok
test_partial_falls_inside_message_delivery_status (email.test.test_email.TestMiscellaneous) ... ok
test_quote_dump (email.test.test_email.TestMiscellaneous) ... ok
test_utils_quote_unquote (email.test.test_email.TestMiscellaneous) ... ok
test_boundary_in_non_multipart (email.test.test_email.TestMultipart) ... ERROR
test_boundary_with_leading_space (email.test.test_email.TestMultipart) ... ok
test_boundary_without_trailing_newline (email.test.test_email.TestMultipart) ... ok
test_double_boundary (email.test.test_email.TestMultipart) ... ok
test_empty_multipart_idempotent (email.test.test_email.TestMultipart) ... ERROR
test_hierarchy (email.test.test_email.TestMultipart) ... ok
test_message_external_body (email.test.test_email.TestMultipart) ... ok
test_nested_inner_contains_outer_boundary (email.test.test_email.TestMultipart) ... ok
test_nested_with_same_boundary (email.test.test_email.TestMultipart) ... ok
test_no_parts_in_a_multipart_with_empty_epilogue (email.test.test_email.TestMultipart) ... ERROR
test_no_parts_in_a_multipart_with_none_epilogue (email.test.test_email.TestMultipart) ... ERROR
test_one_part_in_a_multipart (email.test.test_email.TestMultipart) ... ERROR
test_seq_parts_in_a_multipart_with_empty_epilogue (email.test.test_email.TestMultipart) ... ERROR
test_seq_parts_in_a_multipart_with_empty_preamble (email.test.test_email.TestMultipart) ... ERROR
test_seq_parts_in_a_multipart_with_nl_epilogue (email.test.test_email.TestMultipart) ... ERROR
test_seq_parts_in_a_multipart_with_none_epilogue (email.test.test_email.TestMultipart) ... ERROR
test_seq_parts_in_a_multipart_with_none_preamble (email.test.test_email.TestMultipart) ... ERROR
test_invalid_content_type (email.test.test_email.TestNonConformant) ... ERROR
test_lying_multipart (email.test.test_email.TestNonConformant) ... ok
test_missing_start_boundary (email.test.test_email.TestNonConformant) ... ok
test_multipart_no_boundary (email.test.test_email.TestNonConformant) ... ok
test_no_separating_blank_line (email.test.test_email.TestNonConformant) ... ERROR
test_no_start_boundary (email.test.test_email.TestNonConformant) ... ok
test_parse_missing_minor_type (email.test.test_email.TestNonConformant) ... ok
test_same_boundary_inner_outer (email.test.test_email.TestNonConformant) ... ok
test_crlf_separation (email.test.test_email.TestParsers) ... ok
test_header_parser (email.test.test_email.TestParsers) ... ok
test_multipart_digest_with_extra_mime_headers (email.test.test_email.TestParsers) ... ok
test_rfc2822_header_syntax (email.test.test_email.TestParsers) ... ok
test_rfc2822_space_not_allowed_in_header (email.test.test_email.TestParsers) ... ok
test_strip_line_feed_and_carriage_return_in_headers (email.test.test_email.TestParsers) ... ok
test_three_lines (email.test.test_email.TestParsers) ... ok
test_whitespace_continuation (email.test.test_email.TestParsers) ... ok
test_whitespace_continuation_last_header (email.test.test_email.TestParsers) ... ok
test_body_quopri_check (email.test.test_email.TestQuopri) ... ok
test_body_quopri_len (email.test.test_email.TestQuopri) ... ok
test_decode (email.test.test_email.TestQuopri) ... ok
test_encode (email.test.test_email.TestQuopri) ... ok
test_header_encode (email.test.test_email.TestQuopri) ... ok
test_header_quopri_check (email.test.test_email.TestQuopri) ... ok
test_header_quopri_len (email.test.test_email.TestQuopri) ... ok
test_quote_unquote_idempotent (email.test.test_email.TestQuopri) ... ok
test_rfc2047_multiline (email.test.test_email.TestRFC2047) ... ERROR
test_whitespace_eater_unicode (email.test.test_email.TestRFC2047) ... ERROR
test_whitespace_eater_unicode_2 (email.test.test_email.TestRFC2047) ... ERROR
test_del_param (email.test.test_email.TestRFC2231) ... ERROR
test_get_param (email.test.test_email.TestRFC2231) ... ok
test_rfc2231_get_content_charset (email.test.test_email.TestRFC2231) ... ok
test_rfc2231_no_language_or_charset (email.test.test_email.TestRFC2231) ... ok
test_rfc2231_no_language_or_charset_in_boundary (email.test.test_email.TestRFC2231) ... ok
test_rfc2231_no_language_or_charset_in_charset (email.test.test_email.TestRFC2231) ... ok
test_rfc2231_no_language_or_charset_in_filename (email.test.test_email.TestRFC2231) ... ok
test_rfc2231_unknown_encoding (email.test.test_email.TestRFC2231) ... ok
test_set_param (email.test.test_email.TestRFC2231) ... ERROR

======================================================================
ERROR: test_body_encode (email.test.test_email.TestCharset)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2684, in test_body_encode
    c.body_encode('\xb5\xc6\xc3\xcf\xbb\xfe\xc9\xd7'))
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 363, in body_encode
    s = self.convert(s)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 246, in convert
    return unicode(s, self.input_codec).encode(self.output_codec)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/codecs.py", line 673, in getdecoder
    return lookup(encoding)[1]
TypeError: Encoding must be a string

======================================================================
ERROR: test_default_cte (email.test.test_email.TestEncoders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 509, in test_default_cte
    msg = MIMEText('hello \xf8 world')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/MIMEText.py", line 28, in __init__
    self.set_payload(_text, _charset)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 218, in set_payload
    self.set_charset(charset)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 258, in set_charset
    self.add_header('Content-Transfer-Encoding', cte)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 395, in add_header
    self._headers.append((_name, SEMISPACE.join(parts)))
TypeError: sequence item 0: expected string, function found

======================================================================
ERROR: test_dont_mangle_from (email.test.test_email.TestFromMangling)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 862, in test_dont_mangle_from
    g.flatten(self.msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_mangled_from (email.test.test_email.TestFromMangling)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 851, in test_mangled_from
    g.flatten(self.msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_bad_8bit_header (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2830, in test_bad_8bit_header
    raises(UnicodeError, Header, x)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/unittest.py", line 320, in failUnlessRaises
    callableObj(*args, **kwargs)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_encoded_adjacent_nonencoded (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2840, in test_encoded_adjacent_nonencoded
    h.append('hello', 'iso-8859-1')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_explicit_maxlinelen (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2785, in test_explicit_maxlinelen
    h = Header(hstr)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_header_ctor_default_args (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2779, in test_header_ctor_default_args
    h.append('foo', Charset('iso-8859-1'))
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2721, in test_long
    h = Header("I am the very model of a modern Major-General; I've information vegetable, animal, and mineral; I know the kings of England, and I quote the fights historical from Marathon to Waterloo, in order categorical; I'm very well acquainted, too, with matters mathematical; I understand equations, both the simple and quadratical; about binomial theorem I'm teeming with a lot o' news, with many cheerful facts about the square of the hypotenuse.",
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_multilingual (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2734, in test_multilingual
    h = Header(g_head, g)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_simple (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2704, in test_simple
    h = Header('Hello World!')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_simple_surprise (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2711, in test_simple_surprise
    h = Header('Hello World!')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_string_charset (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2807, in test_string_charset
    h.append('hello', 'iso-8859-1')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_us_ascii_header (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2801, in test_us_ascii_header
    h = make_header(x)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 124, in make_header
    h.append(s, charset)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_utf8_shortest (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2821, in test_utf8_shortest
    h = Header(u'p\xf6stal', 'utf-8')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_whitespace_eater (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2852, in test_whitespace_eater
    hdr = make_header(parts)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 124, in make_header
    h.append(s, charset)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_another_long_almost_unsplittable_header (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 545, in test_another_long_almost_unsplittable_header
    h = Header(hstr, continuation_ws='\t')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_another_long_multiline_header (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 814, in test_another_long_multiline_header
    eq(msg.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_header_splitter (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 628, in test_header_splitter
    g.flatten(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_8bit_header (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 702, in test_long_8bit_header
    h = Header('Britische Regierung gibt', 'iso-8859-1',
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_field_name (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 755, in test_long_field_name
    h = Header(gs, 'iso-8859-1', header_name=fn)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_header_encode (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 601, in test_long_header_encode
    h = Header('wasnipoop; giraffes="very-long-necked-animals"; '
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_header_encode_with_tab_continuation (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 610, in test_long_header_encode_with_tab_continuation
    h = Header('wasnipoop; giraffes="very-long-necked-animals"; '
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_line_after_append (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 737, in test_long_line_after_append
    h = Header(s)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_lines_with_different_header (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 827, in test_long_lines_with_different_header
    msg['List'] = Header(h, header_name='List')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_nonstring (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 564, in test_long_nonstring
    h = Header(g_head, g, header_name='Subject')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_received_header (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 766, in test_long_received_header
    msg['Received-1'] = Header(h, continuation_ws='\t')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_to_header (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 726, in test_long_to_header
    eq(msg.as_string(0), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_long_unbreakable_lines_with_continuation (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 799, in test_long_unbreakable_lines_with_continuation
    msg['Face-2'] = Header(t, header_name='Face-2')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_no_semis_header_splitter (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 646, in test_no_semis_header_splitter
    g.flatten(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_no_split_long_header (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 657, in test_no_split_long_header
    h = Header(hstr, continuation_ws='\t')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_shorter_line_with_append (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 746, in test_shorter_line_with_append
    h = Header(s)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_split_long_continuation (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 530, in test_split_long_continuation
    g.flatten(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_splitting_first_line_only_is_long (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 690, in test_splitting_first_line_only_is_long
    h = Header(hstr, maxlinelen=78, header_name='Received',
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_splitting_multiple_long_lines (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 668, in test_splitting_multiple_long_lines
    h = Header(hstr, continuation_ws='\t')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_string_headerinst_eq (email.test.test_email.TestLongHeaders)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 781, in test_string_headerinst_eq
    msg['Received-1'] = Header(h, header_name='Received-1',
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_default_type_non_parsed (email.test.test_email.TestMIMEMessage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1750, in test_default_type_non_parsed
    neq(container.as_string(0), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 273, in _handle_message
    g.flatten(msg.get_payload(0), unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_epilogue (email.test.test_email.TestMIMEMessage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1655, in test_epilogue
    g.flatten(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_generate (email.test.test_email.TestMIMEMessage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1553, in test_generate
    g.flatten(r)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 273, in _handle_message
    g.flatten(msg.get_payload(0), unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_no_nl_preamble (email.test.test_email.TestMIMEMessage)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1671, in test_no_nl_preamble
    eq(msg.as_string(), """\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_as_string (email.test.test_email.TestMessageAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 240, in test_as_string
    eq(text, msg.as_string())
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_decoded_generator (email.test.test_email.TestMessageAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 217, in test_decoded_generator
    g.flatten(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_charset_richcomparisons (email.test.test_email.TestMiscellaneous)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2152, in test_charset_richcomparisons
    eq(cset1, 'us-ascii')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/unittest.py", line 332, in failUnlessEqual
    if not first == second:
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_boundary_in_non_multipart (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1322, in test_boundary_in_non_multipart
    self.assertEqual(msg.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_empty_multipart_idempotent (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1067, in test_empty_multipart_idempotent
    self.ndiffAssertEqual(text, msg.as_string())
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_no_parts_in_a_multipart_with_empty_epilogue (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1094, in test_no_parts_in_a_multipart_with_empty_epilogue
    self.ndiffAssertEqual(outer.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_no_parts_in_a_multipart_with_none_epilogue (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1075, in test_no_parts_in_a_multipart_with_none_epilogue
    self.ndiffAssertEqual(outer.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_one_part_in_a_multipart (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1116, in test_one_part_in_a_multipart
    eq(outer.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_seq_parts_in_a_multipart_with_empty_epilogue (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1220, in test_seq_parts_in_a_multipart_with_empty_epilogue
    eq(outer.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_seq_parts_in_a_multipart_with_empty_preamble (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1141, in test_seq_parts_in_a_multipart_with_empty_preamble
    eq(outer.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_seq_parts_in_a_multipart_with_nl_epilogue (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1247, in test_seq_parts_in_a_multipart_with_nl_epilogue
    eq(outer.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_seq_parts_in_a_multipart_with_none_epilogue (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1194, in test_seq_parts_in_a_multipart_with_none_epilogue
    eq(outer.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_seq_parts_in_a_multipart_with_none_preamble (email.test.test_email.TestMultipart)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1168, in test_seq_parts_in_a_multipart_with_none_preamble
    eq(outer.as_string(), '''\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 113, in _write
    self._dispatch(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 139, in _dispatch
    meth(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 208, in _handle_multipart
    g.flatten(part, unixfrom=False)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_invalid_content_type (email.test.test_email.TestNonConformant)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1416, in test_invalid_content_type
    g.flatten(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_no_separating_blank_line (email.test.test_email.TestNonConformant)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1439, in test_no_separating_blank_line
    eq(msg.as_string(), """\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_rfc2047_multiline (email.test.test_email.TestRFC2047)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1485, in test_rfc2047_multiline
    eq(str(make_header(dh)),
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 124, in make_header
    h.append(s, charset)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_whitespace_eater_unicode (email.test.test_email.TestRFC2047)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1494, in test_whitespace_eater_unicode
    hu = unicode(make_header(dh)).encode('latin-1')
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 124, in make_header
    h.append(s, charset)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_whitespace_eater_unicode_2 (email.test.test_email.TestRFC2047)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 1503, in test_whitespace_eater_unicode_2
    hu = make_header(dh).__unicode__()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 124, in make_header
    h.append(s, charset)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_del_param (email.test.test_email.TestRFC2231)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2917, in test_del_param
    eq(msg.as_string(), """\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
ERROR: test_set_param (email.test.test_email.TestRFC2231)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2887, in test_set_param
    eq(msg.as_string(), """\
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Message.py", line 129, in as_string
    g.flatten(self, unixfrom=unixfrom)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 82, in flatten
    self._write(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 120, in _write
    self._write_headers(msg)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Generator.py", line 166, in _write_headers
    header_name=h, continuation_ws='\t').encode()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 168, in __init__
    self.append(s, charset, errors)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Header.py", line 244, in append
    if charset <> '8bit':
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 220, in __ne__
    return not self.__eq__(other)
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/Charset.py", line 217, in __eq__
    return str(self) == str(other).lower()
TypeError: __str__ returned non-str (type unicode)

======================================================================
FAIL: test_broken_base64_header (email.test.test_email.TestHeader)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 2859, in test_broken_base64_header
    raises(Errors.HeaderParseError, decode_header, s)
AssertionError: HeaderParseError not raised

======================================================================
FAIL: test_broken_base64_payload (email.test.test_email.TestMessageAPI)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/hpk/pypy-dist/lib-python/2.4.1/email/test/test_email.py", line 486, in test_broken_base64_payload
    self.assertEqual(msg.get_payload(decode=True), x)
AssertionError: '\x03\x00\xe9\xd0\xfe\xff\xff.\x8b\xc0\xa1\x00p\xf6\xbf\xe9\x0f' != 'AwDp0P7//y6LwKEAcPa/6Q=9'

----------------------------------------------------------------------
Ran 220 tests in 1140.260s

FAILED (failures=2, errors=60)

stderr

Loading grammar /home/hpk/pypy-dist/pypy/interpreter/pyparser/data/Grammar2.5a
faking <type 'module'>
faking <type 'file'>
faking <type 'posix.stat_result'>
faking <type 'posix.statvfs_result'>
fake-wrapping interp file <open file '<stdout>', mode 'w' at 0x558e5068>
fake-wrapping interp file <open file '<stderr>', mode 'w' at 0x558e50b0>
fake-wrapping interp file <open file '<stdin>', mode 'r' at 0x558e5020>
faking <type '_socket.socket'>
faking <type 'classobj'>
faking <type 'PyCObject'>
faking <type 'time.struct_time'>
Traceback (application-level):
  File "/home/hpk/pypy-dist/pypy/tool/pytest/run-script/regrverbose.py", line 12 in <module>
    indirect_test()
  File "/home/hpk/pypy-dist/lib-python/2.4.1/test/test_email.py", line 10 in test_main
    run_suite(suite())
  File "/home/hpk/pypy-dist/lib-python/2.4.1/test/test_support.py", line 274 in run_suite
    raise TestFailed(msg)
TestFailed: errors occurred; run in verbose mode for details