Merge lp:~mwhudson/launchpad/failures-should-fail-bug-425113 into lp:launchpad

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mwhudson/launchpad/failures-should-fail-bug-425113
Merge into: lp:launchpad
Diff against target: None lines
To merge this branch: bzr merge lp:~mwhudson/launchpad/failures-should-fail-bug-425113
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Review via email: mp+11834@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Hi jml,

This branch is a band-aid for bug 425113. It also fixes some git import tests that were failing without detection -- luckily this was really simple (the fact that git imports are auto-approved means that we shouldn't unconditionally approve a new import any more).

Cheers,
mwh

Revision history for this message
Jonathan Lange (jml) wrote :

Thanks Michael. I'm glad the failure wasn't that hard to fix.

Could you please put a reference to the Launchpad bug in the comment for the monkey-patch?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/lp/codehosting/codeimport/tests/test_workermonitor.py'
2--- lib/lp/codehosting/codeimport/tests/test_workermonitor.py 2009-06-25 04:06:00 +0000
3+++ lib/lp/codehosting/codeimport/tests/test_workermonitor.py 2009-09-16 00:28:31 +0000
4@@ -498,9 +498,10 @@
5 source_details = CodeImportSourceDetails.fromCodeImport(code_import)
6 clean_up_default_stores_for_import(source_details)
7 self.addCleanup(clean_up_default_stores_for_import, source_details)
8- code_import.updateFromData(
9- {'review_status': CodeImportReviewStatus.REVIEWED},
10- self.factory.makePerson())
11+ if code_import.review_status != CodeImportReviewStatus.REVIEWED:
12+ code_import.updateFromData(
13+ {'review_status': CodeImportReviewStatus.REVIEWED},
14+ self.factory.makePerson())
15 job = getUtility(ICodeImportJobSet).getJobForMachine('machine')
16 self.assertEqual(code_import, job.code_import)
17 return job
18
19=== modified file 'lib/lp/testing/__init__.py'
20--- lib/lp/testing/__init__.py 2009-08-31 16:08:34 +0000
21+++ lib/lp/testing/__init__.py 2009-09-16 00:11:56 +0000
22@@ -43,6 +43,12 @@
23
24 from twisted.python.util import mergeFunctionMetadata
25
26+# zope.exception demands more of frame objects than twisted.python.failure
27+# provides in its fake frames. This is enough to make it work with them
28+# as of 2009-09-16.
29+from twisted.python.failure import _Frame
30+_Frame.f_locals = property(lambda self: {})
31+
32
33 class FakeTime:
34 """Provides a controllable implementation of time.time()."""