Skip to content

Commit c6d37dc

Browse files
committed
Add a unit test preventing square brackets in kinetics group names
1 parent 884a1bb commit c6d37dc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

testing/databaseTest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ def kinetics_checkGroupsFoundInTree(self, family_name):
265265
"""
266266
family = self.database.kinetics.families[family_name]
267267
for nodeName, nodeGroup in family.groups.entries.iteritems():
268+
nose.tools.assert_false('[' in nodeName or ']' in nodeName, "Group {group} in {family} family contains square brackets [ ] in the label, which are not allowed.".format(group=nodeName, family=family_name))
268269
ascendParent = nodeGroup
269270
# Check whether the node has proper parents unless it is the top reactant or product node
270271
while ascendParent not in family.groups.top and ascendParent not in family.forwardTemplate.products:

0 commit comments

Comments
 (0)