示例#1
0
 def test_nonprimary_clause(self):
     self.assertIn("Error: Clause `where` is not primary.",
                   parse("where").messages)
示例#2
0
 def test_invalid_prefix(self):
     self.assertIn(
         "Error: Keyword `asc` is not a valid prefix for `select`.",
         parse("asc select").messages)
示例#3
0
 def test_floating_flag(self):
     self.assertIn("Error: Keyword `distinct` is not a valid clause name.",
                   parse("distinct").messages)
示例#4
0
 def test_phrase(self):
     self.assertIn("Error: Expected keyword, but got `hello`.",
                   parse("hello world").messages)
示例#5
0
 def test_word(self):
     self.assertIn("Error: Expected keyword, but got `hi`.",
                   parse("hi").messages)
示例#6
0
 def test_maths_expr(self):
     self.assertIn("Error: Expected keyword, but got `2`.",
                   parse("2+2").messages)
示例#7
0
 def test_empty(self):
     self.assertIn("Error: No tokens to consume.", parse("").messages)