def startTest(self, test): """ record initiation of a test case. Update the last start time of the test suite & test case. """ if self.connection: description = self.get_full_doc(test) test_id = test.id() file_path, suite, case = test.address() case_update = { "id": test_id, "name": case, "description": description, "suite": suite, "lastStarted": NoseDBReporterBase.time_now() } suite_update = { "suite": suite, "lastStarted": NoseDBReporterBase.time_now() } self.__execute_query(self.suite_start_query, suite_update) self.__execute_query(self.case_start_query, case_update) super(NoseMySQLReporter, self).startTest(test)
def startTest(self, test): """ record initiation of a test case (``test``). Update the last start time of the test suite & test case. """ if self.connection: description = self.get_full_doc(test) test_id = test.id() file_path, suite, case = test.address() case_update = { "id":test_id, "name":case, "description":description, "suite":suite, "lastStarted":NoseDBReporterBase.time_now() } suite_update = { "suite":suite, "lastStarted":NoseDBReporterBase.time_now() } self.__execute_query(self.suite_start_query, suite_update) self.__execute_query(self.case_start_query, case_update) super(NoseSQLiteReporter, self).startTest(test)
def __init__(self): NoseDBReporterBase.__init__(self)