~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-23 06:39:46 UTC
  • mfrom: (2034 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2035.
  • Revision ID: john@arbash-meinel.com-20060923063946-e596c8a8eef928b4
[merge] bzr.dev 2034

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
        if isinstance(err[1], TestSkipped):
243
243
            return self.addSkipped(test, err)    
244
244
        unittest.TestResult.addError(self, test, err)
245
 
        test.setKeepLogfile()
 
245
        # We can only do this if we have one of our TestCases, not if
 
246
        # we have a doctest.
 
247
        setKeepLogFile = getattr(test, 'setKeepLogFile', None)
 
248
        if setKeepLogFile is not None:
 
249
            setKeepLogfile()
246
250
        self.extractBenchmarkTime(test)
247
251
        if self.showAll:
248
252
            self.stream.writeln("ERROR %s" % self._testTimeString())
259
263
 
260
264
    def addFailure(self, test, err):
261
265
        unittest.TestResult.addFailure(self, test, err)
262
 
        test.setKeepLogfile()
 
266
        # We can only do this if we have one of our TestCases, not if
 
267
        # we have a doctest.
 
268
        setKeepLogFile = getattr(test, 'setKeepLogFile', None)
 
269
        if setKeepLogFile is not None:
 
270
            setKeepLogfile()
263
271
        self.extractBenchmarkTime(test)
264
272
        if self.showAll:
265
273
            self.stream.writeln(" FAIL %s" % self._testTimeString())
1570
1578
                   'bzrlib.tests.test_urlutils',
1571
1579
                   'bzrlib.tests.test_versionedfile',
1572
1580
                   'bzrlib.tests.test_version',
 
1581
                   'bzrlib.tests.test_version_info',
1573
1582
                   'bzrlib.tests.test_weave',
1574
1583
                   'bzrlib.tests.test_whitebox',
1575
1584
                   'bzrlib.tests.test_workingtree',