Skip to content

Commit

Permalink
fixed test_serotyping - KeyError: 'serovar_in_serovar_list' error
Browse files Browse the repository at this point in the history
  • Loading branch information
kbessonov1984 committed Nov 26, 2024
1 parent 0eacf75 commit a02725e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_serotyping.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ def test_serotyping(fasta_path):
assert sistr_json_results['antigenic_formula'] == "58:l,z13,z28:z6"
assert sistr_json_results['cgmlst_matching_alleles'] == 330
assert sistr_json_results['cgmlst_found_loci'] == 330
assert sistr_json_results['serovar_in_serovar_list'] == "Y"
assert sistr_json_results['predicted_serovar_in_list'] == "Y"
assert sistr_json_results['serovar'] == "II 58:l,z13,z28:z6"

def test_noserovarlist_file(fasta_path):
sys.argv[1:] = ["-i",fasta_path, "test", "--more-results", "--run-mash", "--qc", "-l", "no_file_exists.txt", "-vvv", "-o", "sistr_test_results"]
main()
with open("sistr_test_results.json") as fp:
sistr_json_results = json.load(fp)[0]
assert 'serovar_in_serovar_list' not in sistr_json_results.keys()
assert 'predicted_serovar_in_list' not in sistr_json_results.keys()

0 comments on commit a02725e

Please sign in to comment.