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
=== modified file 'NEWS'
--- NEWS 2010-04-01 14:10:47 +0000
+++ NEWS 2010-04-28 21:03:34 +0000
@@ -26,6 +26,11 @@
26 history no longer crash when deleted files are involved.26 history no longer crash when deleted files are involved.
27 (Vincent Ladeuil, John Arbash Meinel, #375898)27 (Vincent Ladeuil, John Arbash Meinel, #375898)
2828
29* Selftest with versions of subunit that support ``stopTestRun`` will no longer
30 error. This error was caused by 2.0 not being updated when upstream
31 python merged the end of run patch, which chose ``stopTestRun`` rather than
32 ``done``. (Robert Collins, #571437)
33
29bzr 2.0.534bzr 2.0.5
30#########35#########
3136
3237
=== modified file 'bzrlib/tests/__init__.py'
--- bzrlib/tests/__init__.py 2010-03-18 05:49:26 +0000
+++ bzrlib/tests/__init__.py 2010-04-28 21:03:34 +0000
@@ -191,6 +191,8 @@
191 '%s is leaking threads among %d leaking tests.\n' % (191 '%s is leaking threads among %d leaking tests.\n' % (
192 TestCase._first_thread_leaker_id,192 TestCase._first_thread_leaker_id,
193 TestCase._leaking_threads_tests))193 TestCase._leaking_threads_tests))
194 # When merging to 2.1 this should conflict - take the 2.1 fix.
195 stopTestRun = done
194196
195 def _extractBenchmarkTime(self, testCase):197 def _extractBenchmarkTime(self, testCase):
196 """Add a benchmark time for the current test case."""198 """Add a benchmark time for the current test case."""
@@ -425,6 +427,8 @@
425 # called when the tests that are going to run have run427 # called when the tests that are going to run have run
426 self.pb.clear()428 self.pb.clear()
427 super(TextTestResult, self).done()429 super(TextTestResult, self).done()
430 # When merging to 2.1 this should conflict - take the 2.1 fix.
431 stopTestRun = done
428432
429 def finished(self):433 def finished(self):
430 self.pb.finished()434 self.pb.finished()
@@ -2812,7 +2816,8 @@
2812 result = runner.run(suite)2816 result = runner.run(suite)
2813 if list_only:2817 if list_only:
2814 return True2818 return True
2815 result.done()2819 done = getattr(result, 'done', getattr(result, 'stopTestRun', None))
2820 done()
2816 if strict:2821 if strict:
2817 return result.wasStrictlySuccessful()2822 return result.wasStrictlySuccessful()
2818 else:2823 else:

Subscribers

People subscribed via source and target branches