Пример #1
0
 def test_three(self):
     self.assertEqual(generate_parens(3), [
         '((()))',
         '(()())',
         '(())()',
         '()(())',
         '()()()',
     ])
Пример #2
0
 def test_negative(self):
     self.assertEqual(generate_parens(-1), [])
Пример #3
0
 def test_none(self):
     self.assertEqual(generate_parens(0), [])
Пример #4
0
 def test_two(self):
     self.assertEqual(generate_parens(2), ['(())', '()()'])
Пример #5
0
 def test_one(self):
     self.assertEqual(generate_parens(1), ['()'])