#NEWLINE# def create_run( skips = 0 , fails = 0 , passes = 0 , run_time = 0 , artifacts = None , id = None , session = None , run_at = None ) : #NEWLINE# #INDENT# "Create a new run record in the database\n\n    :param int skips: total number of skipped tests defaults to 0\n    :param int fails: total number of failed tests defaults to 0\n    :param int passes: total number of passed tests defaults to 0\n    :param float run_time: total run timed defaults to 0\n    :param str artifacts: A link to any artifacts from the test run defaults to\n                          None\n    :param str id: the run id for the new run, needs to be a unique value\n    :param session: optional session object if one isn't provided a new session\n                    will be acquired for the duration of this operation\n    :param run_at: optional time at which the run was started. If not specified\n                   the time that data is added to the DB will be used instead\n\n    :return: The run object stored in the DB\n    :rtype: subunit2sql.models.Run\n    " #NEWLINE# run = models . Run ( ) #NEWLINE# if id : #NEWLINE# #INDENT# run . uuid = id #NEWLINE# #UNINDENT# if run_at : #NEWLINE# #INDENT# run . run_at = run_at #NEWLINE# #UNINDENT# run . skips = skips #NEWLINE# run . fails = fails #NEWLINE# run . passes = passes #NEWLINE# run . run_time = run_time #NEWLINE# run . artifacts = artifacts #NEWLINE# session = ( session or get_session ( ) ) #NEWLINE# with session . begin ( ) : #NEWLINE# #INDENT# session . add ( run ) #NEWLINE# #UNINDENT# return run