def test_should_detect_redundant_braces(self): a = "((a+b))" self.assertTrue(has_redundant_braces(a))
def test_should_not_detect_redundant_braces(self): a = "(a+(b+c))" self.assertFalse(has_redundant_braces(a))
def test_should_detect_inner_redundant_braces(self): a = "(a+((b+c)))" self.assertTrue(has_redundant_braces(a))