def test_functions(self): t = make_paired_tokens(scan("log(7)")) s = [['N', '*', '5'], ['N', '*', '7'], ['Z', '*', '']] self.assertEqual(t, s, 'problem with function calls')
def test_comments(self): t = make_paired_tokens(scan("5 + 6 # + 56")) s = [['N', '*', '5'], ['N', '+', '6'], ['Z', '*', '']] self.assertEqual(t, s, 'problem with comments')
def test_implied_multiplication(self): t = make_paired_tokens(scan("5 7")) s = [['N', '*', '5'], ['N', '*', '7'], ['Z', '*', '']] self.assertEqual(t, s, 'problem with implied multiplication')