def _check_file(self, f): '''Run tests on a morphology file''' L.info('File: %s', f) result = True 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 &= self._check_loop(data, 'structural_checks') nrn = fst_core.FstNeuron(data) result &= self._check_loop(nrn, 'neuron_checks') except Exception as e: # pylint: disable=W0703 L.error('Check failed:' + str(type(e)) + str(e.args)) result = False self.summary['ALL'] = result for m, s in self.summary.items(): self._log_msg(m, s) return result, {f: self.summary}
def test_neuron_name(): d = _io.load_data(FILENAMES[0]) nrn = _core.FstNeuron(d, '12af3rg') nt.eq_(nrn.name, '12af3rg')