def test_parse_taxa(self): """parse_taxa should return the taxa # from a taxa_field from find_fields""" result1 = find_fields(line1) result2 = find_fields(line2) result3 = find_fields(line3) result4 = find_fields(line4) self.assertEqual(parse_taxa(result1["taxa"]), '40') self.assertEqual(parse_taxa(result2["taxa"]), '1') self.assertEqual(parse_taxa(result3["taxa"]), '39') self.assertEqual(parse_taxa(result4["taxa"]), '2')
def test_find_fields(self): """find_fields takes BL table line and returns field names mapped to info""" result = find_fields(line1) self.assertEqual(result['taxa'], "40") self.assertEqual(result['bl'], "0") self.assertEqual(result['parent'], "root")