コード例 #1
0
ファイル: test_parse.py プロジェクト: matthewjkuss/csvql
 def test_nonprimary_clause(self):
     self.assertIn("Error: Clause `where` is not primary.",
                   parse("where").messages)
コード例 #2
0
ファイル: test_parse.py プロジェクト: matthewjkuss/csvql
 def test_invalid_prefix(self):
     self.assertIn(
         "Error: Keyword `asc` is not a valid prefix for `select`.",
         parse("asc select").messages)
コード例 #3
0
ファイル: test_parse.py プロジェクト: matthewjkuss/csvql
 def test_floating_flag(self):
     self.assertIn("Error: Keyword `distinct` is not a valid clause name.",
                   parse("distinct").messages)
コード例 #4
0
ファイル: test_parse.py プロジェクト: matthewjkuss/csvql
 def test_phrase(self):
     self.assertIn("Error: Expected keyword, but got `hello`.",
                   parse("hello world").messages)
コード例 #5
0
ファイル: test_parse.py プロジェクト: matthewjkuss/csvql
 def test_word(self):
     self.assertIn("Error: Expected keyword, but got `hi`.",
                   parse("hi").messages)
コード例 #6
0
ファイル: test_parse.py プロジェクト: matthewjkuss/csvql
 def test_maths_expr(self):
     self.assertIn("Error: Expected keyword, but got `2`.",
                   parse("2+2").messages)
コード例 #7
0
ファイル: test_parse.py プロジェクト: matthewjkuss/csvql
 def test_empty(self):
     self.assertIn("Error: No tokens to consume.", parse("").messages)