def _check_file(self, f):
        '''Run tests on a morphology file'''
        L.info('File: %s', f)

        full_result = True
        full_summary = OrderedDict()
        try:
            data = load_data(f)
        except Exception as e:  # pylint: disable=W0703
            L.error('Failed to load data... skipping tests for this file')
            L.error(e.args)
            return False, {f: OrderedDict([('ALL', False)])}

        try:
            result, summary = self._check_loop(data, 'structural_checks')
            full_result &= result
            full_summary.update(summary)

            nrn = fst_core.FstNeuron(data)
            result, summary = self._check_loop(nrn, 'neuron_checks')
            full_result &= result
            full_summary.update(summary)
        except Exception as e:  # pylint: disable=W0703
            L.error('Check failed: %s', str(type(e)) + str(e.args))
            full_result = False

        full_summary['ALL'] = full_result

        for m, s in full_summary.items():
            self._log_msg(m, s)

        return full_result, {f: full_summary}
def _check_file ( self , f ) : L . info ( 'File: %s' , f ) full_result = True full_summary = OrderedDict ( ) try : data = load_data ( f ) except Exception as e : L . error ( 'Failed to load data... skipping tests for this file' ) L . error ( e . args ) return False , { f : OrderedDict ( [ ( 'ALL' , False ) ] ) } try : result , summary = self . _check_loop ( data , 'structural_checks' ) full_result &= result full_summary . update ( summary ) nrn = fst_core . FstNeuron ( data ) result , summary = self . _check_loop ( nrn , 'neuron_checks' ) full_result &= result full_summary . update ( summary ) except Exception as e : L . error ( 'Check failed: %s' , str ( type ( e ) ) + str ( e . args ) ) full_result = False full_summary [ 'ALL' ] = full_result for m , s in full_summary . items ( ) : self . _log_msg ( m , s ) return full_result , { f : full_summary }
Run tests on a morphology file