def test_for_operators(self): self.assertFalse(sy.isLeftBracket("+")) self.assertFalse(sy.isLeftBracket("-")) self.assertFalse(sy.isLeftBracket("*")) self.assertFalse(sy.isLeftBracket("/"))
def test_for_number(self): self.assertFalse(sy.isLeftBracket("1"))
def test_for_right_bracket(self): self.assertFalse(sy.isLeftBracket(")")) self.assertFalse(sy.isLeftBracket("]"))
def test_for_left_bracket(self): self.assertTrue(sy.isLeftBracket("(")) self.assertTrue(sy.isLeftBracket("["))
def test_wrong_input_type(self): with self.assertRaises(TypeError): sy.isLeftBracket(1)
def test_single_left_bracket(self): self.assertTrue(sy.isLeftBracket('['))
def test_empty_char(self): with self.assertRaises(ValueError): sy.isLeftBracket('')
def test_non_left_bracket(self): self.assertFalse(sy.isLeftBracket('a'))
def test_multiple_left_brackets(self): with self.assertRaises(ValueError): sy.isLeftBracket('[(')
def test_single_right_bracket(self): self.assertFalse(sy.isLeftBracket(')'))
def test_single_right_parenthesis(self): self.assertFalse(sy.isLeftBracket(']'))