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