/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Robert Collins
  • Date: 2006-05-09 05:36:32 UTC
  • mto: (1704.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1706.
  • Revision ID: robertc@robertcollins.net-20060509053632-e606e04c2e78f123
Adjust test-of-tests to accomodate the global state of TEST_ROOT.

Show diffs side-by-side

added added

removed removed

Lines of Context:
289
289
        # but only a little. Folk not using our testrunner will
290
290
        # have to delete their temp directories themselves.
291
291
        test_root = TestCaseInTempDir.TEST_ROOT
292
 
        if result.wasSuccessful() and not self.keep_output:
 
292
        if result.wasSuccessful() or not self.keep_output:
293
293
            if test_root is not None:
294
 
                print 'Deleting test root %s...' % test_root
295
 
                try:
296
294
                    osutils.rmtree(test_root)
297
 
                finally:
298
 
                    print
299
295
        else:
300
 
            self.stream.write("Failed tests working directories are in '%s'\n"
301
 
                              % TestCaseInTempDir.TEST_ROOT)
 
296
            if self.pb is not None:
 
297
                self.pb.note("Failed tests working directories are in '%s'\n",
 
298
                             test_root)
 
299
            else:
 
300
                self.stream.writeln(
 
301
                    "Failed tests working directories are in '%s'\n" %
 
302
                    test_root)
 
303
        TestCaseInTempDir.TEST_ROOT = None
302
304
        if self.pb is not None:
303
305
            self.pb.clear()
304
306
        return result