~bzr-pqm/bzr/2.0

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-04-29 00:42:22 UTC
  • mfrom: (4745.1.1 2.0-new-subunit)
  • Revision ID: pqm@pqm.ubuntu.com-20100429004222-7l54pqjnaeer9gyr
(lifeless) Update the test suite API usage to use stopTestRun if done is not present. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
191
191
                '%s is leaking threads among %d leaking tests.\n' % (
192
192
                TestCase._first_thread_leaker_id,
193
193
                TestCase._leaking_threads_tests))
 
194
    # When merging to 2.1 this should conflict - take the 2.1 fix.
 
195
    stopTestRun = done
194
196
 
195
197
    def _extractBenchmarkTime(self, testCase):
196
198
        """Add a benchmark time for the current test case."""
425
427
        # called when the tests that are going to run have run
426
428
        self.pb.clear()
427
429
        super(TextTestResult, self).done()
 
430
    # When merging to 2.1 this should conflict - take the 2.1 fix.
 
431
    stopTestRun = done
428
432
 
429
433
    def finished(self):
430
434
        self.pb.finished()
2812
2816
    result = runner.run(suite)
2813
2817
    if list_only:
2814
2818
        return True
2815
 
    result.done()
 
2819
    done = getattr(result, 'done', getattr(result, 'stopTestRun', None))
 
2820
    done()
2816
2821
    if strict:
2817
2822
        return result.wasStrictlySuccessful()
2818
2823
    else: