Esempio n. 1
0
 def test_unary_tests(self):
     self.check_table_parser('null', AST.PositiveUnaryTests([AST.Null()]))
     self.check_table_parser(NOT_STR, NOT_AST)
     self.check_table_parser('-', AST.NoTest())
Esempio n. 2
0
 def test_simple_unary_tests(self):
     self._check_simple_unary_tests_parser(SIMPLE_POSITIVE_UNARY_TESTS_STR, SIMPLE_POSITIVE_UNARY_TESTS_AST)
     self._check_simple_unary_tests_parser('not (%s)' % SIMPLE_POSITIVE_UNARY_TESTS_STR,
                                           AST.Not(SIMPLE_POSITIVE_UNARY_TESTS_AST))
     self._check_simple_unary_tests_parser('-', AST.NoTest())
Esempio n. 3
0
 def p_no_tests(self, p):
     """no_tests : '-'"""
     p[0] = AST.NoTest()