def test_list_adder(self): """list_adder should add items to list, creating if necessary""" d = dummy() list_adder(d, 'x', 3) self.assertEqual(d.x, [3]) list_adder(d, 'x', 'abc') self.assertEqual(d.x, [3, 'abc']) list_adder(d, 'y', [2,3]) self.assertEqual(d.x, [3, 'abc']) self.assertEqual(d.y, [[2,3]])
def test_list_adder(self): """list_adder should add items to list, creating if necessary""" d = dummy() list_adder(d, 'x', 3) self.assertEqual(d.x, [3]) list_adder(d, 'x', 'abc') self.assertEqual(d.x, [3, 'abc']) list_adder(d, 'y', [2, 3]) self.assertEqual(d.x, [3, 'abc']) self.assertEqual(d.y, [[2, 3]])
def _grif_adder(obj, field, line): """Adds grif to relevant field""" list_adder(obj, field, _read_grif(line))
def _protsim_adder(obj, field, val): """Appends the current ProtSim record to specified field""" list_adder(obj, field, _read_protsim(val))
def _seq_adder(obj, field, val): """Appends the current Sequence-type record to specified field""" list_adder(obj, field, _read_seq(val))
def _generic_adder(obj, field, line): """Adds line to relevant field, unparsed""" list_adder(obj, field, line.strip())
def _sts_adder(obj, field, val): """Appends the current STS-type record to specified field""" list_adder(obj, field, _read_sts(val))
def _go_adder(obj, field, line): """Adds go to relevant field""" list_adder(obj, field, _read_go(line))
def _map_adder(obj, field, line): """Adds map to relevant field""" list_adder(obj, field, _read_map(line))
def _cdd_adder(obj, field, line): """Adds cdd to relevant field""" list_adder(obj, field, _read_cdd(line))
def _comp_adder(obj, field, line): """Adds comp to relevant field""" list_adder(obj, field, _read_comp(line))
def _sts_adder(obj, field, line): """Adds sts to relevant field""" list_adder(obj, field, _read_sts(line))
def _rell_adder(obj, field, line): """Adds rell to relevant field""" list_adder(obj, field, _read_rell(line))
def _accnum_adder(obj, field, line): """Adds accnum to relevant field""" list_adder(obj, field, _read_accnum(line))
def _accession_adder(obj, field, line): """Adds accessions to relevant field""" list_adder(obj, field, _read_accession(line))
def _assembly_adder(obj, field, line): """Adds assembly to relevant field""" list_adder(obj, field, commas(line))
def _extannot_adder(obj, field, line): """Adds pmid to relevant field""" list_adder(obj, field, _read_extannot(line))
def _contig_adder(obj, field, line): """Adds contig to relevant field""" list_adder(obj, field, _read_contig(line))