diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-09-25 08:20:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-09-25 08:20:06 +0000 |
commit | bd2d949d1f2fb728cf4c429dd3ae9a1510e10182 (patch) | |
tree | c051102e5aff0ca2d75e5b96b09968c52114060a /tests/test_expressions.py | |
parent | Adding upstream version 18.5.1. (diff) | |
download | sqlglot-bd2d949d1f2fb728cf4c429dd3ae9a1510e10182.tar.xz sqlglot-bd2d949d1f2fb728cf4c429dd3ae9a1510e10182.zip |
Adding upstream version 18.7.0.upstream/18.7.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 | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_expressions.py b/tests/test_expressions.py index b3ce926..b1b5360 100644 --- a/tests/test_expressions.py +++ b/tests/test_expressions.py @@ -14,6 +14,13 @@ class TestExpressions(unittest.TestCase): def test_depth(self): self.assertEqual(parse_one("x(1)").find(exp.Literal).depth, 1) + def test_iter(self): + self.assertEqual([exp.Literal.number(1), exp.Literal.number(2)], list(parse_one("[1, 2]"))) + + with self.assertRaises(TypeError): + for x in parse_one("1"): + pass + def test_eq(self): self.assertNotEqual(exp.to_identifier("a"), exp.to_identifier("A")) |