Opened 15 years ago

Closed 15 years ago

Last modified 13 years ago

#11546 closed (fixed)

regressiontests.mail fails on Ubuntu 9.04

Reported by: Richard Davies <richard.davies@…> Owned by: nobody
Component: Core (Mail) Version: dev
Severity: Keywords:
Cc: richard.davies@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

I've downloaded SVN r11324 after the 1.1 release candidate, and am running the test suite on Ubuntu 9.04 against sqlite3. I get the following error:

$ ./runtests.py --settings=settings-sqlite mail
======================================================================
FAIL: Doctest: regressiontests.mail.tests
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/richard/tmp/trunk/django/test/_doctest.py", line 2180, in runTest
    raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for regressiontests.mail.tests
  File "/home/richard/tmp/trunk/tests/regressiontests/mail/tests.py", line 1, in tests

----------------------------------------------------------------------
File "/home/richard/tmp/trunk/tests/regressiontests/mail/tests.py", line 109, in regressiontests.mail.tests
Failed example:
    print msg.message().as_string()
Expected:
    Content-Type: multipart/mixed; boundary="..."
    MIME-Version: 1.0
    Subject: hello
    From: from@example.com
    To: to@example.com
    Date: Fri, 09 Nov 2001 01:08:47 -0000
    Message-ID: foo
    ...
    Content-Type: multipart/alternative; boundary="..."
    MIME-Version: 1.0
    ...
    Content-Type: text/plain; charset="utf-8"
    MIME-Version: 1.0
    Content-Transfer-Encoding: quoted-printable
    ...
    This is an important message.
    ...
    Content-Type: text/html; charset="utf-8"
    MIME-Version: 1.0
    Content-Transfer-Encoding: quoted-printable
    ...
    <p>This is an <strong>important</strong> message.</p>
    ...
    ...
    Content-Type: application/pdf
    MIME-Version: 1.0
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename="an attachment.pdf"
    ...
    JVBERi0xLjQuJS4uLg==
    ...
Got:
    Content-Type: multipart/mixed; boundary="===============1531250635939447231=="
    MIME-Version: 1.0
    Subject: hello
    From: from@example.com
    To: to@example.com
    Date: Fri, 09 Nov 2001 01:08:47 -0000
    Message-ID: foo
    <BLANKLINE>
    --===============1531250635939447231==
    Content-Type: multipart/alternative;
        boundary="===============8480584666162200602=="
    MIME-Version: 1.0
    <BLANKLINE>
    --===============8480584666162200602==
    Content-Type: text/plain; charset="utf-8"
    MIME-Version: 1.0
    Content-Transfer-Encoding: quoted-printable
    <BLANKLINE>
    This is an important message.
    --===============8480584666162200602==
    Content-Type: text/html; charset="utf-8"
    MIME-Version: 1.0
    Content-Transfer-Encoding: quoted-printable
    <BLANKLINE>
    <p>This is an <strong>important</strong> message.</p>
    --===============8480584666162200602==--
    --===============1531250635939447231==
    Content-Type: application/pdf
    MIME-Version: 1.0
    Content-Transfer-Encoding: base64
    Content-Disposition: attachment; filename="an attachment.pdf"
    <BLANKLINE>
    JVBERi0xLjQuJS4uLg==
    --===============1531250635939447231==--


----------------------------------------------------------------------
Ran 1 test in 0.019s

FAILED (failures=1)

Change History (4)

comment:1 by Russell Keith-Magee, 15 years ago

Triage Stage: UnreviewedAccepted

I can confirm that this problem also exists on Ubuntu 8.10. It's not a problem with MacOSX (10.5), or with Debian Lenny/sid.

However, I'm unclear if this is actually a bug in Django, or a weird inconsistency in the standard library packaged with Ubuntu. I'm looking into it.

comment:2 by Russell Keith-Magee, 15 years ago

On deeper inspection, it appears to be a 64 bit vs 32 bit issue.

On 32 bit platforms, multipart boundaries of the form:

Content-Type: multipart/alternative; boundary="===============0582992217=="

which is what the tests expect. However on 64 bit platforms, you get:

Content-Type: multipart/alternative;
    boundary="===============8480584666162200602=="

which gets line wrapped due to the extra length of the boundary string.

This means it is a failure of the test, not of the code itself. I'm looking into ways around the problem.

comment:3 by Russell Keith-Magee, 15 years ago

Resolution: fixed
Status: newclosed

(In [11328]) Fixed #11546 -- Modified the mail regression test to avoid getting hung up on 32/64 bit differences. Thanks to Richard Davies for the report.

comment:4 by Jacob, 13 years ago

milestone: 1.1

Milestone 1.1 deleted

Note: See TracTickets for help on using tickets.
Back to Top