Code

Opened 5 years ago

Closed 5 years ago

Last modified 3 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: master
Severity: Keywords:
Cc: richard.davies@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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)

Attachments (0)

Change History (4)

comment:1 Changed 5 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

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 Changed 5 years ago by russellm

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 Changed 5 years ago by russellm

  • Resolution set to fixed
  • Status changed from new to closed

(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 Changed 3 years ago by jacob

  • milestone 1.1 deleted

Milestone 1.1 deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.