summaryrefslogtreecommitdiffstats
path: root/tests/test_expressions.py
diff options
context:
space:
mode:
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)