diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-10-22 17:00:19 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-10-22 17:00:19 +0000 |
commit | 357f4c323239b9ba9b604c444fe3c2e1991e46ec (patch) | |
tree | 739aa7ddca96a60c9148554b35bb1b231cb9888f /tests/test_expressions.py | |
parent | Releasing debian version 25.24.5-1. (diff) | |
download | sqlglot-357f4c323239b9ba9b604c444fe3c2e1991e46ec.tar.xz sqlglot-357f4c323239b9ba9b604c444fe3c2e1991e46ec.zip |
Merging upstream version 25.26.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/test_expressions.py')
-rw-r--r-- | tests/test_expressions.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/test_expressions.py b/tests/test_expressions.py index 1c88952..8ff117a 100644 --- a/tests/test_expressions.py +++ b/tests/test_expressions.py @@ -935,15 +935,13 @@ FROM foo""", 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") - with self.assertRaises(ValueError): - exp.to_interval("bla") + self.assertEqual(exp.to_interval("-2 day").sql(), "INTERVAL '-2' DAY") self.assertEqual(exp.to_interval(exp.Literal.string("1day")).sql(), "INTERVAL '1' DAY") + self.assertEqual(exp.to_interval(exp.Literal.string("-2 day")).sql(), "INTERVAL '-2' DAY") self.assertEqual( exp.to_interval(exp.Literal.string(" 5 months")).sql(), "INTERVAL '5' MONTHS" ) - with self.assertRaises(ValueError): - exp.to_interval(exp.Literal.string("bla")) def test_to_table(self): table_only = exp.to_table("table_name") |