Esempio n. 1
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 ])
Esempio n. 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])
Esempio n. 3
0
 def verify(self, pol, expected):
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, expected)
Esempio n. 4
0
 def verify(self, pol, expected):
     results = Parser.eval(self.e, pol)
     self.assertEqual(results, expected)
Esempio n. 5
0
 def setUp(self):
     self.e = Parser.Evaluator()