diff --git a/tests/test_rules.py b/tests/test_rules.py index c5c0036f7..d20c96e29 100644 --- a/tests/test_rules.py +++ b/tests/test_rules.py @@ -92,11 +92,10 @@ def test_rules_compliance(self): # Search for a closing brace. matchClosingBrace = re.search("}", statement) - if numMessage > 0 and matchClosingBrace is not None: - numMessage -= 1 - if isEnum is True and matchClosingBrace is not None: isEnum = False + elif numMessage > 0 and matchClosingBrace is not None: + numMessage -= 1 if matchComment is not None: if re.search(r"^[ ]\\\bendrules\b$", comment) is not None: @@ -130,4 +129,4 @@ def test_rules_compliance(self): lineruleCount += 1 if __name__ == '__main__': - unittest.main() \ No newline at end of file + unittest.main()