mirror of
https://github.com/github/codeql.git
synced 2026-05-01 11:45:14 +02:00
Python: Add missing test cases
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user