예제 #1
0
 def test_valid_multiple_types(self):
     self.assertEqual(is_valid('()[]{}'), True)
예제 #2
0
 def test_valid_paren(self):
     self.assertEqual(is_valid('()'), True)
예제 #3
0
 def test_unclosed(self):
     self.assertEqual(is_valid('['), False)
예제 #4
0
 def test_valid_nested(self):
     self.assertEqual(is_valid('{[]}'), True)
예제 #5
0
 def test_invalid_order(self):
     self.assertEqual(is_valid('([)]'), False)
예제 #6
0
 def test_invalid_multiple_types(self):
     self.assertEqual(is_valid('(]'), False)