Merge lp:~mars/launchpad/fix-ec2test-utf-in-devel into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Michael Hudson-Doyle on 2010-10-06 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11683 |
| Proposed branch: | lp:~mars/launchpad/fix-ec2test-utf-in-devel |
| Merge into: | lp:launchpad |
| Diff against target: |
101 lines (+21/-13) 1 file modified
lib/devscripts/ec2test/tests/test_remote.py (+21/-13) |
| To merge this branch: | bzr merge lp:~mars/launchpad/fix-ec2test-utf-in-devel |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Michael Hudson-Doyle | Approve on 2010-10-06 | ||
| Leonard Richardson | 2010-10-06 | Pending | |
| Jonathan Lange | 2010-10-06 | Pending | |
|
Review via email:
|
|||
This proposal supersedes a proposal from 2010-10-06.
Commit Message
Fix a number of errors related to the utf-8 charset in the ec2 test suite.
Description of the Change
Hi,
This branch fixes a problem on production-devel and Maverick local developer stations where a test would fail with a UTF-8 decoding error. This patch has already landed in production (see https:/
In this new proposal I have applied the technique more widely to catch a number of similar errors identified in the Launchpad stable branch. I reproduced these errors using devel on Maverick, and have patched them accordingly. All tests in 'bin/test -cv devscripts.
Maris
| Māris Fogels (mars) wrote : | # |
> Hey Mars,
>
> I think the right approach is to change get_body_text() to use decode=True
> itself. The point of the helper is to get the text.
>
> Also, strangely, these tests are failing for me in *stable*.
>
> jml
I saw this test failing for me in devel/Maverick, and in production-
I can fix the helper, but I also found that the reported TestResult changed if I did not do the calculations before the assertEquals() call. If the assertEquals() failed, then *its* TestResult would be used instead, to the great confusion of the developer.
I can change the helper.
| Māris Fogels (mars) wrote : | # |
Jono, does this fix look better?
| Michael Hudson-Doyle (mwhudson) wrote : | # |
Looks plausible. I'm taking your word that it fixes the tests :-)

Hey Mars,
I think the right approach is to change get_body_text() to use decode=True itself. The point of the helper is to get the text.
Also, strangely, these tests are failing for me in *stable*.
jml