From 026295431680cbe07694ef280b31464b70d7fe64 Mon Sep 17 00:00:00 2001 From: Abel Legese <73869888+Abellegese@users.noreply.github.com> Date: Thu, 24 Oct 2024 19:46:39 +0300 Subject: [PATCH] Fixing pytest error: Adding a test case for smiles checker --- test/test_compound_identifier.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/test_compound_identifier.py b/test/test_compound_identifier.py index e0cc5bd7b..cbe8dc1b6 100644 --- a/test/test_compound_identifier.py +++ b/test/test_compound_identifier.py @@ -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."""