From 357f4c323239b9ba9b604c444fe3c2e1991e46ec Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 22 Oct 2024 19:00:19 +0200 Subject: Merging upstream version 25.26.0. Signed-off-by: Daniel Baumann --- tests/test_expressions.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'tests/test_expressions.py') 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") -- cgit v1.2.3