示例#1
0
 def test_correct_str_3(self):
     self.assertEqual(hw.is_nested("()()()"), 1)
示例#2
0
 def test_type_err(self):
     with self.assertRaises(TypeError):
         hw.is_nested(22)
示例#3
0
 def test_correct_str_2(self):
     self.assertEqual(hw.is_nested("(((((((())"), 1)
示例#4
0
 def test_incorrect_str(self):
     self.assertEqual(hw.is_nested("))))))))())"), 0)
示例#5
0
 def test_len_3_str(self):
     self.assertEqual(hw.is_nested("()("), 0)
示例#6
0
 def test_closing_opening_parentheses(self):
     self.assertEqual(hw.is_nested("))))))((("), 0)
示例#7
0
 def test_empty_str(self):
     self.assertEqual(hw.is_nested(""), 0)