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.py7
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"))