launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #26414
[Merge] ~cjwatson/launchpad:py3-true-division-2 into launchpad:master
Colin Watson has proposed merging ~cjwatson/launchpad:py3-true-division-2 into launchpad:master.
Commit message:
Handle / being true division in Python 3 (take 2)
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/398639
Similar to https://code.launchpad.net/~cjwatson/launchpad/+git/launchpad/+merge/396326, but I missed a spot. I also tweaked the test slightly to handle different details of email serialization on Python 3.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad:py3-true-division-2 into launchpad:master.
diff --git a/lib/lp/bugs/tests/bugs-emailinterface.txt b/lib/lp/bugs/tests/bugs-emailinterface.txt
index 91b0af8..d5476bc 100644
--- a/lib/lp/bugs/tests/bugs-emailinterface.txt
+++ b/lib/lp/bugs/tests/bugs-emailinterface.txt
@@ -2116,7 +2116,9 @@ too large. In that case we cannot really return the entire original
message as our outgoing message will be too big. So, we can truncate
the original message.
- >>> max_return_size = len(str(test_msg)) / 2
+ >>> import math
+
+ >>> max_return_size = int(math.ceil(len(str(test_msg)) / 2))
>>> send_process_error_notification(
... sampledata.USER_EMAIL, 'Some subject', 'Some error message.',
... test_msg, failing_command=['foo bar'],
@@ -2127,9 +2129,9 @@ the original message.
>>> failure_msg, original_msg = sent_msg.get_payload()
>>> msg = original_msg.get_payload()[0]
-Fudge due to new line added to the payload.
+Fudge due to new lines added to the payload.
- >>> len(str(msg)) <= (max_return_size + 1)
+ >>> len(str(msg)) <= (max_return_size + 2)
True
Error handling