예제 #1
0
파일: ParserTests.py 프로젝트: oVirt/mom
 def test_comments(self):
     pol = """
     # This is a full-line pound comment
     12 # A partial-line comment with (+ 23 43) keywords
     (+ 3 # An expression with embedded comments
     2)
     """
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, [ 12, 5 ])
예제 #2
0
 def test_comments(self):
     pol = """
     # This is a full-line pound comment
     12 # A partial-line comment with (+ 23 43) keywords
     (+ 3 # An expression with embedded comments
     2)
     """
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, [12, 5])
예제 #3
0
파일: ParserTests.py 프로젝트: oVirt/mom
 def verify(self, pol, expected):
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, expected)
예제 #4
0
 def verify(self, pol, expected):
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, expected)
예제 #5
0
 def setUp(self):
     self.e = Parser.Evaluator()