Skip to content
Snippets Groups Projects
Commit 64c45ef9 authored by Amandine  PERRIN's avatar Amandine PERRIN
Browse files

add test when a genome name is included in another one

parent 105574f8
No related branches found
No related tags found
No related merge requests found
Pipeline #65273 passed
...@@ -55,14 +55,22 @@ def test_get_genome(): ...@@ -55,14 +55,22 @@ def test_get_genome():
assert pal.get_genome(header, genomes) == "TOTO.0215.00002" assert pal.get_genome(header, genomes) == "TOTO.0215.00002"
def test_get_genome_not_start(): def test_get_genome_included():
""" """
Given a header and a list of genomes, check that it returns the expected genome. The genome Given a header and a list of genomes, check that it returns the expected genome
name is not at the beginning of the protein name
""" """
header = ">mongenome,TOTO.0215.00002.i006_00065" header = ">aTOTO.0215.00002.i006_00065"
genomes = ["TOTO.0315.00001", "ESCO.0215.00002", "ESCO.0215.00001", "TOTO.0215.00002"] genomes = [ "TOTO.0215.00002", "TOTO.0315.00001", "ESCO.0215.00002", "aTOTO.0215.00002"]
assert pal.get_genome(header, genomes) == "TOTO.0215.00002" assert pal.get_genome(header, genomes) == "aTOTO.0215.00002"
# def test_get_genome_not_start():
# """
# Given a header and a list of genomes, check that it returns the expected genome. The genome
# name is not at the beginning of the protein name
# """
# header = ">mongenome,TOTO.0215.00002.i006_00065"
# genomes = ["TOTO.0315.00001", "ESCO.0215.00002", "ESCO.0215.00001", "TOTO.0215.00002"]
# assert pal.get_genome(header, genomes) == "TOTO.0215.00002"
def test_get_genome_notfound(caplog): def test_get_genome_notfound(caplog):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment