summaryrefslogtreecommitdiffstats
path: root/tests/test_expressions.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:50:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 02:50:21 +0000
commitda8fc943704a221b86f0f6938f4131f0dd679f82 (patch)
treebef7144499ea444319403ba8dbf68480ae3a4e39 /tests/test_expressions.py
parentAdding upstream version 23.10.0. (diff)
downloadsqlglot-da8fc943704a221b86f0f6938f4131f0dd679f82.tar.xz
sqlglot-da8fc943704a221b86f0f6938f4131f0dd679f82.zip
Adding upstream version 23.12.1.upstream/23.12.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_expressions.py')
-rw-r--r--tests/test_expressions.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/test_expressions.py b/tests/test_expressions.py
index 85560b8..81cfb86 100644
--- a/tests/test_expressions.py
+++ b/tests/test_expressions.py
@@ -871,6 +871,8 @@ FROM foo""",
FROM foo""",
)
+ self.assertEqual(parse_one('max(x) as "a b" -- comment').comments, [" comment"])
+
def test_to_interval(self):
self.assertEqual(exp.to_interval("1day").sql(), "INTERVAL '1' DAY")
self.assertEqual(exp.to_interval(" 5 months").sql(), "INTERVAL '5' MONTHS")
@@ -1104,6 +1106,6 @@ FROM foo""",
parse_one("x").assert_is(exp.Column)
with self.assertRaisesRegex(
- AssertionError, "x is not <class 'sqlglot.expressions.Identifier'>\."
+ AssertionError, "x is not <class 'sqlglot.expressions.Identifier'>\\."
):
parse_one("x").assert_is(exp.Identifier)