Skip to content

Commit

Permalink
test more verbose errors
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrunewald committed Nov 17, 2024
1 parent 8196158 commit 351c15c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cgsmiles/tests/test_molecule_resolve.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ def _atomname_match(n1, n2):
("{[#A][#B]1}.{#A=CC[$],#B=OC[$]}", "You have a dangling ring index.", SyntaxError),
("{[#A]1[#B]1}{#A=CC[$],#B=OC[$]}", "You define two edges between the same node. Use bond order symbols instead.", SyntaxError),
("{[#A;w=abc][#B]}.{#A=CC[$],#B=OC[$]}", "Argument 'w' must be of type float.", TypeError),
("{[#A;w=ab=c][#B]}.{#A=CC[$],#B=OC[$]}", "Your annotation w=ab=c contains too many = charachters. Only one chacracter per key value pair is allowed", SyntaxError),
("{[#A;w=1,c=1,q=a;d][#B]}.{#A=CC[$],#B=OC[$]}", "You have too many positional arguments or ; as part of key value pairs which is not allowed.", SyntaxError),
)))
def test_syntax_errors(cgsmiles_str, error_message, error_type):
with pytest.raises(error_type) as e_message:
Expand Down

0 comments on commit 351c15c

Please sign in to comment.