Skip to content

Commit

Permalink
Cleans up test comments and makes an error more verbose
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelgondu committed Aug 20, 2024
1 parent c84a6a1 commit b06607b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 6 additions & 1 deletion src/poli/objective_repository/rasp/isolated_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,12 @@ def __call__(self, x, context=None):
)

if hamming_distance > 1 and not self.additive:
raise ValueError("RaSP is only able to simulate single mutations.")
raise ValueError(
"RaSP is only able to simulate single mutations."
" If you want to simulate multiple mutations,"
" you should set additive=True in the create method"
" or in the black box of RaSP."
)

closest_wildtypes[closest_wildtype_pdb_file].append(mutant_residue_string)
mutant_residue_strings.append(mutant_residue_string)
Expand Down
4 changes: 0 additions & 4 deletions src/poli/tests/registry/proteins/test_rasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@

@pytest.mark.poli__rasp
def test_rasp_on_3ned_against_notebooks_results():
# If the previous import was successful, we can
# create a RaSP problem:
problem = objective_factory.create(
name="rasp",
wildtype_pdb_path=THIS_DIR / "3ned.pdb",
Expand Down Expand Up @@ -79,8 +77,6 @@ def test_rasp_on_3ned_against_notebooks_results_isolated():

@pytest.mark.poli__rasp
def test_rasp_using_additive_flag_on_two_mutations():
# If the previous import was successful, we can
# create a RaSP problem:
problem = objective_factory.create(
name="rasp",
wildtype_pdb_path=THIS_DIR / "3ned.pdb",
Expand Down

0 comments on commit b06607b

Please sign in to comment.