Merge lp:~lifeless/bzr/2.0-new-subunit into lp:bzr/2.0

Proposed by Robert Collins
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~lifeless/bzr/2.0-new-subunit
Merge into: lp:bzr/2.0
Diff against target: 47 lines (+11/-1)
2 files modified
NEWS (+5/-0)
bzrlib/tests/__init__.py (+6/-1)
To merge this branch: bzr merge lp:~lifeless/bzr/2.0-new-subunit
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+24365@code.launchpad.net

Commit message

Update the test suite API usage to use stopTestRun if done is not present.

Description of the change

This should unblock other branches from landing in 2.0

To post a comment you must log in.
Revision history for this message
John A Meinel (jameinel) wrote :

I assume you know more about this than I do.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-04-01 14:10:47 +0000
3+++ NEWS 2010-04-28 21:03:34 +0000
4@@ -26,6 +26,11 @@
5 history no longer crash when deleted files are involved.
6 (Vincent Ladeuil, John Arbash Meinel, #375898)
7
8+* Selftest with versions of subunit that support ``stopTestRun`` will no longer
9+ error. This error was caused by 2.0 not being updated when upstream
10+ python merged the end of run patch, which chose ``stopTestRun`` rather than
11+ ``done``. (Robert Collins, #571437)
12+
13 bzr 2.0.5
14 #########
15
16
17=== modified file 'bzrlib/tests/__init__.py'
18--- bzrlib/tests/__init__.py 2010-03-18 05:49:26 +0000
19+++ bzrlib/tests/__init__.py 2010-04-28 21:03:34 +0000
20@@ -191,6 +191,8 @@
21 '%s is leaking threads among %d leaking tests.\n' % (
22 TestCase._first_thread_leaker_id,
23 TestCase._leaking_threads_tests))
24+ # When merging to 2.1 this should conflict - take the 2.1 fix.
25+ stopTestRun = done
26
27 def _extractBenchmarkTime(self, testCase):
28 """Add a benchmark time for the current test case."""
29@@ -425,6 +427,8 @@
30 # called when the tests that are going to run have run
31 self.pb.clear()
32 super(TextTestResult, self).done()
33+ # When merging to 2.1 this should conflict - take the 2.1 fix.
34+ stopTestRun = done
35
36 def finished(self):
37 self.pb.finished()
38@@ -2812,7 +2816,8 @@
39 result = runner.run(suite)
40 if list_only:
41 return True
42- result.done()
43+ done = getattr(result, 'done', getattr(result, 'stopTestRun', None))
44+ done()
45 if strict:
46 return result.wasStrictlySuccessful()
47 else:

Subscribers

People subscribed via source and target branches