def test_withEmptyString_shouldReturnTrue(self): # with empty = "" # when result = parentheses_match(empty) # then assert result
def test_withOneParenthesesPair_shouldReturnTrue(self): # with one_pair = "()" # when result = parentheses_match(one_pair) # then assert result
def test_withUnmatchedParenthesesInExpression_shouldReturnFalse(self): # with expression = "(((2+4) * 3) + ((3 - 6) * 4) ^ 2) / 7 + (5 - )(6))*(4)" # when result = parentheses_match(expression) # then assert result == False
def test_withOneTooManyClosingParentheses_shouldReturnFalse(self): # with expression = "(()))" # when result = parentheses_match(expression) # then assert result == False
def test_withOnlyOneClosedParentheses_shouldReturnFalse(self): # with expression = ")" # when result = parentheses_match(expression) # then assert result == False
def test_withExclusivelyMatchingParentheses_shouldReturnTrue(self): # with multiple_pairs = "(((())(()())))()()" # when result = parentheses_match(multiple_pairs) # then assert result
def test_withExpressionContainingMatchingParentheses_shouldReturnTrue( self): # with expression = "(((2+4) * 3) + ((3 - 6) * 4) ^ 2) / 7 + (5 - (6))*(4)" # when result = parentheses_match(expression) # then assert result