def test_withEmptyString_shouldReturn0(self): # with expression = "" # when result = longest_parenthesis(expression) # then assert result == 0
def test_withUnMatchedParentheses_shouldReturn0(self): # with expression = "() (()) (" # when result = longest_parenthesis(expression) # then assert result == 0
def test_withFilledSinglePair_shouldReturnlength(self): # with expression = "(1 + 3 + 4 * 7)" # when result = longest_parenthesis(expression) # then assert result == len(expression)
def test_withComplexExpression_shouldReturn4(self): # with expression = "() (()) ()" # when result = longest_parenthesis(expression) # then assert result == 4
def test_withSinglePair_shouldReturn2(self): # with expression = "()" # when result = longest_parenthesis(expression) # then assert result == 2