src/generateExcel.py
def _setResultInfo(self, data: list):
        """Trim result information to report
        Args
        ----------
            data: list
                0: checker function (SQ, SAT, LOAD)
                1: checker terminal (DAB, FSR, ...)
                2: checker status (OPEN, SHORT, ...)
                3: criteria (9011, 80011A, ...)
                4: result (9022, 80011B, ...)
                5: checker judgement (PASS, FAIL)
        Returns
        ----------
            Nothing: set result information
        """
        repResultInfo = [['機能','端子','状態','判定基準','結果','判定']]
        bufResultInfo = [''] * 6
        _data = [[d[1].split('_')[0],d[1].split('->')[0].split('_')[1],d[1].split('->')[1],d[2],d[3],d[4]] for d in data]
        resultInfo = [[s.replace(',','\n') for s in ss] for ss in _data]
        for i, item in enumerate(resultInfo):
            if item[2][0:5] == 'LEVEL':
                bufResultInfo = item
                repResultInfo.append(bufResultInfo)
                bufResultInfo = [''] * 6
            elif item[0]=='SQ' or item[0]=='SAT' or item[0]=='LOAD':
                bufResultInfo[0] = item[0]
                bufResultInfo[1] = item[1]
                bufResultInfo[2] = item[2]
            elif item[2] == 'DTCread':
                bufResultInfo[3] = item[3]
                bufResultInfo[4] = item[4]
                bufResultInfo[5] = item[5]
                if bufResultInfo[0] != '':
                    repResultInfo.append(bufResultInfo)
                    bufResultInfo = [''] * 6
        self._result_info = repResultInfo
Trim result information to report
        Args
        ----------
            data: list
                0: checker function (SQ, SAT, LOAD)
                1: checker terminal (DAB, FSR, ...)
                2: checker status (OPEN, SHORT, ...)
                3: criteria (9011, 80011A, ...)
                4: result (9022, 80011B, ...)
                5: checker judgement (PASS, FAIL)
        Returns
        ----------
            Nothing: set result information
        
Trim result information to report
Args



set result information
Trim result information to report Args set result information
def _setResultInfo(self, data: list):
        repResultInfo = [['機能','端子','状態','判定基準','結果','判定']]
        bufResultInfo = [''] * 6
        _data = [[d[1].split('_')[0],d[1].split('->')[0].split('_')[1],d[1].split('->')[1],d[2],d[3],d[4]] for d in data]
        resultInfo = [[s.replace(',','\n') for s in ss] for ss in _data]
        for i, item in enumerate(resultInfo):
            if item[2][0:5] == 'LEVEL':
                bufResultInfo = item
                repResultInfo.append(bufResultInfo)
                bufResultInfo = [''] * 6
            elif item[0]=='SQ' or item[0]=='SAT' or item[0]=='LOAD':
                bufResultInfo[0] = item[0]
                bufResultInfo[1] = item[1]
                bufResultInfo[2] = item[2]
            elif item[2] == 'DTCread':
                bufResultInfo[3] = item[3]
                bufResultInfo[4] = item[4]
                bufResultInfo[5] = item[5]
                if bufResultInfo[0] != '':
                    repResultInfo.append(bufResultInfo)
                    bufResultInfo = [''] * 6
        self._result_info = repResultInfo
def _setResultInfo ( self , data : list ) : repResultInfo = [ [ '機能','端子 ' ,'状態','判 定 基準','結果' , '判定']] bufResultInfo = [ '' ] * 6 _data = [ [ d [ 1 ] . split ( '_' ) [ 0 ] , d [ 1 ] . split ( '->' ) [ 0 ] . split ( '_' ) [ 1 ] , d [ 1 ] . split ( '->' ) [ 1 ] , d [ 2 ] , d [ 3 ] , d [ 4 ] ] for d in data ] resultInfo = [ [ s . replace ( ',' , '\n' ) for s in ss ] for ss in _data ] for i , item in enumerate ( resultInfo ) : if item [ 2 ] [ 0 : 5 ] == 'LEVEL' : bufResultInfo = item repResultInfo . append ( bufResultInfo ) bufResultInfo = [ '' ] * 6 elif item [ 0 ] == 'SQ' or item [ 0 ] == 'SAT' or item [ 0 ] == 'LOAD' : bufResultInfo [ 0 ] = item [ 0 ] bufResultInfo [ 1 ] = item [ 1 ] bufResultInfo [ 2 ] = item [ 2 ] elif item [ 2 ] == 'DTCread' : bufResultInfo [ 3 ] = item [ 3 ] bufResultInfo [ 4 ] = item [ 4 ] bufResultInfo [ 5 ] = item [ 5 ] if bufResultInfo [ 0 ] != '' : repResultInfo . append ( bufResultInfo ) bufResultInfo = [ '' ] * 6 self . _result_info = repResultInfo
Trim result information to report
Args
Trim result information to report Args
"""Trim result information to report
        Args
        ----------
            data: list
                0: checker function (SQ, SAT, LOAD)
                1: checker terminal (DAB, FSR, ...)
                2: checker status (OPEN, SHORT, ...)
                3: criteria (9011, 80011A, ...)
                4: result (9022, 80011B, ...)
                5: checker judgement (PASS, FAIL)
        Returns
        ----------
            Nothing: set result information
        """
self
data
list