Python: Add missing test cases

This commit is contained in:
Rasmus Lerchedahl Petersen
2021-01-19 20:19:45 +01:00
parent bd3de23c6e
commit 5a652ab3aa
2 changed files with 565 additions and 546 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -206,6 +206,11 @@ def test_unpacking_comprehension():
SINK(x[0]) # Flow missing
def test_star_unpacking_comprehension():
x = [a[0] for (*a, b) in [(SOURCE, NONSOURCE)]]
SINK(x[0]) # Flow missing
# 6.2.8. Generator expressions
def test_generator():
x = (SOURCE for y in [NONSOURCE])
@@ -626,6 +631,14 @@ def test_iterated_unpacking_assignment_conversion():
SINK_F(b[0])
@expects(3)
def test_iterable_repacking():
a, *(b, c) = (SOURCE, NONSOURCE, SOURCE)
SINK(a)
SINK_F(b)
SINK(c) # Flow not found
@expects(4)
def test_iterable_unpacking_in_for():
tl = [(SOURCE, NONSOURCE), (SOURCE, NONSOURCE)]