diff --git a/tests/test_index.py b/tests/test_index.py index 77b1955e2a..45f421a383 100644 --- a/tests/test_index.py +++ b/tests/test_index.py @@ -1170,8 +1170,8 @@ def test_multi_index_load_from_path(): # check to make sure that full paths to expected sig files are returned locs = [ x[1] for x in mi.signatures_with_location() ] - endings = ('prot/protein/GCA_001593925.1_ASM159392v1_protein.faa.gz.sig', - 'prot/protein/GCA_001593935.1_ASM159393v1_protein.faa.gz.sig') + endings = ('GCA_001593925.1_ASM159392v1_protein.faa.gz.sig', + 'GCA_001593935.1_ASM159393v1_protein.faa.gz.sig') for loc in locs: found = False for end in endings: @@ -1179,6 +1179,13 @@ def test_multi_index_load_from_path(): found = True assert found, f"could not find full filename in locations for {end}" + # also check internal locations and parent value -- + assert mi.parent.endswith('prot/protein') + + ilocs = [ x[2] for x in mi._signatures_with_internal() ] + assert endings[0] in ilocs, ilocs + assert endings[1] in ilocs, ilocs + def test_multi_index_load_from_path_2(): # only load .sig files, currently; not the databases under that directory.