Skip to content

Commit

Permalink
Fixing pytest error: Adding a test case for smiles checker
Browse files Browse the repository at this point in the history
  • Loading branch information
Abellegese authored Oct 24, 2024
1 parent 9110816 commit 0262954
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/test_compound_identifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@
def compound_identifier():
return CompoundIdentifier()

def test_is_smiles_with_chem():
identifier = CompoundIdentifier()
result = identifier._is_smiles("C(C(=O)O)c1ccccc1")
assert result == True

def test_is_smiles_without_chem():
identifier = CompoundIdentifier(local=False)
result = identifier._is_smiles("C(C(=O)O)c1ccccc1")
assert result == "WLJVXDMOQOGPHL-UHFFFAOYSA-N"

@pytest.mark.parametrize("header", ["smiles", "input", "SMILES", "INPUT"])
def test_is_input_header_positive(compound_identifier, header):
"""Test that valid input headers return True."""
Expand Down

0 comments on commit 0262954

Please sign in to comment.