Merge lp:~jelmer/brz/timestamp-range into lp:brz

Proposed by Jelmer Vernooij
Status: Merged
Approved by: Jelmer Vernooij
Approved revision: 7207
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~jelmer/brz/timestamp-range
Merge into: lp:brz
Diff against target: 12 lines (+1/-1)
1 file modified
breezy/tests/ (+1/-1)
To merge this branch: bzr merge lp:~jelmer/brz/timestamp-range
Reviewer Review Type Date Requested Status
Martin Packman Approve
Review via email:

Commit message

Handle overflow errors from Python 2 as well.

Description of the change

Handle overflow errors from Python 2 as well.

Without this, the test (which uses random inputs) fails with:

ERROR: breezy.tests.test_timestamp.UnpackHighresDateTests.test_random
Traceback (most recent call last):
testtools.testresult.real._StringException: Empty attachments:

Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/breezy/tests/", line 141, in test_random
ValueError: timestamp out of range for platform time_t

Ran 30616 tests in 460.561s

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :


review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'breezy/tests/'
2--- breezy/tests/ 2018-11-12 01:41:38 +0000
3+++ breezy/tests/ 2018-11-21 22:18:12 +0000
4@@ -139,7 +139,7 @@
5 t += random.random() * 24 * 3600 * 30
6 try:
7 time.gmtime(t)
8- except OverflowError:
9+ except (OverflowError, ValueError):
10 # We've reached the maximum for time_t on this platform
11 break
12 if time.localtime(t).tm_year > 9998:


People subscribed via source and target branches