'An internal method to insert a new test result into the
database. This method will not raise an exception, even if an
error occurs during the insert, to avoid failing a test
simply because of unexpected database issues.'

def __insert_test(self, test):

    self.num_tests_run += 1
    if status_lib.is_worse_than_or_equal_to(test.status, 'FAIL'):
        self.num_tests_failed += 1
    try:
        dbutils.insert_test(self.job_model, test)
    except Exception:
        msg = ('WARNING:    An    unexpected    error    occurred    while    inserting    test    results    into    the    database.    Ignoring    error.\n' + traceback.format_exc())
        print >>sys.stderr, msg
