Beispiel #1
0
 def test_01_matching_parentheses(self):
     parentheses = "((())()())()"
     expected = [[0, 9], [1, 4], [2, 3], [5, 6], [7, 8], [10, 11]]
     self.assertEqual(matching_parentheses(parentheses), expected)
Beispiel #2
0
 def test_07_matching_parentheses(self):
     parentheses = "(()"
     expected = None
     self.assertEqual(matching_parentheses(parentheses), expected)
Beispiel #3
0
 def test_01_matching_parentheses(self):
     result = matching_parentheses(self.input)
     self.assertEqual(result, self.expected)
Beispiel #4
0
 def test_04_matching_parentheses(self):
     parentheses = "()"
     expected = [[0, 1]]
     self.assertEqual(matching_parentheses(parentheses), expected)