diff --git a/tests/test_integration.py b/tests/test_integration.py index 7ffd57a..00860ec 100755 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -56,8 +56,6 @@ def remove_directory(dir_path): # return tmpdir_factory.mktemp("tmp") -temp_dir = Path(f"{test_data}/fake_out") - # the server can be down run_remote = False @@ -88,6 +86,8 @@ def test_install(): def test_run_genbank(): """test phold run with genbank input""" input_gbk: Path = f"{test_data}/combined_truncated_acr_defense_vfdb_card.gbk" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold run -i {input_gbk} -o {run_gbk_dir} -t {threads} --cpu -d {database_dir} -f" exec_command(cmd) @@ -95,6 +95,8 @@ def test_run_genbank(): def test_predict_genbank(): """test phold predict with genbank input""" input_gbk: Path = f"{test_data}/combined_truncated_acr_defense_vfdb_card.gbk" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold predict -i {input_gbk} -o {predict_gbk_dir} -t {threads} --cpu -d {database_dir} -f" exec_command(cmd) @@ -102,6 +104,8 @@ def test_predict_genbank(): def test_compare_genbank(): """test phold compare with genbank input""" input_gbk: Path = f"{test_data}/combined_truncated_acr_defense_vfdb_card.gbk" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold compare -i {input_gbk} -o {compare_gbk_dir} --predictions_dir {predict_gbk_dir} -t {threads} -d {database_dir} -f" exec_command(cmd) @@ -109,6 +113,8 @@ def test_compare_genbank(): def test_compare_pdb(): """test phold compare with pdbs input""" input_gbk: Path = f"{test_data}/NC_043029.gbk" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold compare -i {input_gbk} -o {compare_pdb_dir} -t {threads} -d {database_dir} --pdb --pdb_dir {pdb_dir} -f" exec_command(cmd) @@ -116,6 +122,8 @@ def test_compare_pdb(): def test_predict_fasta(): """test phold predict with fasta input""" input_fasta: Path = f"{test_data}/combined_truncated_acr_defense_vfdb_card.gbk" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold predict -i {input_fasta} -o {predict_fasta_dir} -t {threads} -d {database_dir} --cpu -f" exec_command(cmd) @@ -123,6 +131,8 @@ def test_predict_fasta(): def test_compare_fasta(): """test phold compare with fasta input""" input_fasta: Path = f"{test_data}/combined_truncated_acr_defense_vfdb_card.fasta" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold compare -i {input_fasta} -o {compare_fasta_dir} --predictions_dir {predict_fasta_dir} -t {threads} -d {database_dir} -f" exec_command(cmd) @@ -130,6 +140,8 @@ def test_compare_fasta(): def test_proteins_predict(): """test phold proteins-predict""" input_fasta: Path = f"{test_data}/phanotate.faa" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold proteins-predict -i {input_fasta} -o {proteins_predict_dir} -t {threads} -d {database_dir} --cpu -f" exec_command(cmd) @@ -137,6 +149,8 @@ def test_proteins_predict(): def test_proteins_compare(): """test phold proteins-compare""" input_fasta: Path = f"{test_data}/phanotate.faa" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold proteins-compare -i {input_fasta} --predictions_dir {proteins_predict_dir} -o {proteins_compare_dir} -t {threads} -d {database_dir} -f" exec_command(cmd) @@ -146,6 +160,8 @@ def test_proteins_compare(): def test_remote_genbank(): """test phold remote with genbank input""" input_gbk: Path = f"{test_data}/combined_truncated_acr_defense_vfdb_card.gbk" + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold remote -i {input_gbk} -o {remote_gbk_dir} -t {threads} -d {database_dir} -f" exec_command(cmd) @@ -154,6 +170,8 @@ def test_remote_fasta(): input_fasta: Path = ( f"{test_data}/combined_truncated_acr_defense_vfdb_card.fasta" ) + cmd = f"phold install -d {database_dir} " + exec_command(cmd) cmd = f"phold remote -i {input_fasta} -o {remote_fasta_dir} -t {threads} -d {database_dir} -f" exec_command(cmd) @@ -170,5 +188,3 @@ def test_remote_fasta(): remove_directory(output_dir) - -