From 351c15c0183f7cb177548af94f903eb63dd00196 Mon Sep 17 00:00:00 2001 From: Fabian Gruenewald Date: Sun, 17 Nov 2024 19:21:20 +0100 Subject: [PATCH] test more verbose errors --- cgsmiles/tests/test_molecule_resolve.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cgsmiles/tests/test_molecule_resolve.py b/cgsmiles/tests/test_molecule_resolve.py index f4569ba..4e62d6f 100644 --- a/cgsmiles/tests/test_molecule_resolve.py +++ b/cgsmiles/tests/test_molecule_resolve.py @@ -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: