~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

Integrate latest bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
879
879
    # This is still a little bogus, 
880
880
    # but only a little. Folk not using our testrunner will
881
881
    # have to delete their temp directories themselves.
 
882
    test_root = TestCaseInTempDir.TEST_ROOT
882
883
    if result.wasSuccessful() or not keep_output:
883
 
        if TestCaseInTempDir.TEST_ROOT is not None:
884
 
            shutil.rmtree(TestCaseInTempDir.TEST_ROOT) 
 
884
        if test_root is not None:
 
885
            print 'Deleting test root %s...' % test_root
 
886
            try:
 
887
                shutil.rmtree(test_root)
 
888
            finally:
 
889
                print
885
890
    else:
886
891
        print "Failed tests working directories are in '%s'\n" % TestCaseInTempDir.TEST_ROOT
887
892
    return result.wasSuccessful()