diff options
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r-- | tests/test_parser.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/test_parser.py b/tests/test_parser.py index b60d719..1bf951a 100644 --- a/tests/test_parser.py +++ b/tests/test_parser.py @@ -14,6 +14,10 @@ class TestParser(unittest.TestCase): parse_one("") def test_parse_into(self): + self.assertIsInstance(parse_one("(1)", into=exp.Tuple), exp.Tuple) + self.assertIsInstance(parse_one("(1,)", into=exp.Tuple), exp.Tuple) + self.assertIsInstance(parse_one("(x=1)", into=exp.Tuple), exp.Tuple) + self.assertIsInstance(parse_one("select * from t", into=exp.Select), exp.Select) self.assertIsInstance(parse_one("select * from t limit 5", into=exp.Select), exp.Select) self.assertIsInstance(parse_one("left join foo", into=exp.Join), exp.Join) @@ -23,9 +27,9 @@ class TestParser(unittest.TestCase): self.assertIsInstance( parse_one( "WHEN MATCHED THEN UPDATE SET target.salary = COALESCE(source.salary, target.salary)", - into=exp.When, + into=exp.Whens, ), - exp.When, + exp.Whens, ) with self.assertRaises(ParseError) as ctx: |