mirror of
https://github.com/github/codeql.git
synced 2026-05-05 21:55:19 +02:00
Python: Add copy of internal Python 3 tests
Again, mostly extractor tests, and a single library test.
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
| test.py:2:12:2:17 | Tuple |
|
||||
| test.py:6:15:6:20 | Tuple |
|
||||
| test.py:8:15:8:19 | Tuple |
|
||||
| test.py:10:21:10:23 | Tuple |
|
||||
| test.py:10:27:10:29 | Tuple |
|
||||
11
python/ql/test/3/extractor-tests/tuple_unpacking/test.py
Normal file
11
python/ql/test/3/extractor-tests/tuple_unpacking/test.py
Normal file
@@ -0,0 +1,11 @@
|
||||
def cons(x, ys):
|
||||
return x, *ys
|
||||
|
||||
def cons_each(xs, ys):
|
||||
for x in xs:
|
||||
yield x, *ys
|
||||
|
||||
print(cons(1,(2,3,4)))
|
||||
|
||||
for l in cons_each((1,2),(3,4)):
|
||||
print(l)
|
||||
3
python/ql/test/3/extractor-tests/tuple_unpacking/test.ql
Normal file
3
python/ql/test/3/extractor-tests/tuple_unpacking/test.ql
Normal file
@@ -0,0 +1,3 @@
|
||||
import python
|
||||
|
||||
select any(Tuple t)
|
||||
Reference in New Issue
Block a user