diff options
Diffstat (limited to 'test/test_loop.py')
-rw-r--r-- | test/test_loop.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/test_loop.py b/test/test_loop.py index d048ed0..2c11000 100644 --- a/test/test_loop.py +++ b/test/test_loop.py @@ -31,6 +31,16 @@ class TestLoop(unittest.TestCase): "x", "[y+1 for y in [1, 2, 3]]", ), + ( + "for ((key1, val1), (key2, val2)) in pairwise(dict.items()):", + "((key1, val1), (key2, val2))", + "pairwise(dict.items())", + ), + ( + "for (key1, val1), (key2, val2) in pairwise(dict.items()):", + "(key1, val1), (key2, val2)", + "pairwise(dict.items())", + ), ): match = _FOR_LOOP.match(statement) assert match and match.groups() == (target_list, expression_list) |