summaryrefslogtreecommitdiffstats
path: root/tests/test_parser.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-13 07:45:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-13 07:45:22 +0000
commit21f20723eed2e3b68174cc474029083f1ce32afc (patch)
treeef12b2eb7eb404213a96c82cda0b070489ffce63 /tests/test_parser.py
parentReleasing debian version 25.34.0-1. (diff)
downloadsqlglot-21f20723eed2e3b68174cc474029083f1ce32afc.tar.xz
sqlglot-21f20723eed2e3b68174cc474029083f1ce32afc.zip
Merging upstream version 26.0.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_parser.py')
-rw-r--r--tests/test_parser.py8
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: