Merge lp://staging/~mbp/launchpad/882324-mtime-test into lp://staging/launchpad

Proposed by Martin Pool
Status: Merged
Approved by: Martin Pool
Approved revision: no longer in the source branch.
Merged at revision: 14198
Proposed branch: lp://staging/~mbp/launchpad/882324-mtime-test
Merge into: lp://staging/launchpad
Diff against target: 26 lines (+8/-1)
1 file modified
lib/canonical/launchpad/utilities/ftests/test_gpghandler.py (+8/-1)
To merge this branch: bzr merge lp://staging/~mbp/launchpad/882324-mtime-test
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+80521@code.staging.launchpad.net

Commit message

[r=lifeless][bug=882324] make testHomeDirectoryJob assertion more robust and fail more obviously

Description of the change

This tries to make the spurious test failure in bug 882324 either not happen, or at least fail in a more obvious way.

I can't reproduce it locally after several tries so I'm not sure this fixes it.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

That looks ok, though personally I would ditch the assertTrue for
assertThat(
    floor(os.path.getmtime(fname)), Or(LessThan(now), Equals(now)), "fname")

review: Approve
Revision history for this message
Robert Collins (lifeless) wrote :

erm, \o/ on typos. Obviously I meant:
assertThat(floor(os.path.getmtime(fname)), Not(LessThan(now)), "fname")

Revision history for this message
Robert Collins (lifeless) wrote :

and without the quotes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.