mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
Python: Show we're able to handle example with __init__.py files
This commit is contained in:
@@ -2,5 +2,5 @@ debug_missingAnnotationForCallable
|
||||
debug_nonUniqueAnnotationForCallable
|
||||
debug_missingAnnotationForCall
|
||||
expectedCallEdgeNotFound
|
||||
| example.py:18:1:18:7 | afunc() | foo/bar/a.py:2:1:2:12 | Function afunc |
|
||||
| example.py:19:1:19:7 | afunc() | foo/bar/a.py:2:1:2:12 | Function afunc |
|
||||
unexpectedCallEdgeFound
|
||||
|
||||
@@ -2,4 +2,5 @@ debug_missingAnnotationForCallable
|
||||
debug_nonUniqueAnnotationForCallable
|
||||
debug_missingAnnotationForCall
|
||||
pointsTo_found_typeTracker_notFound
|
||||
| example.py:22:1:22:16 | explicit_afunc() | foo_explicit/bar/a.py:2:1:2:21 | Function explicit_afunc |
|
||||
pointsTo_notFound_typeTracker_found
|
||||
|
||||
@@ -2,5 +2,6 @@ debug_missingAnnotationForCallable
|
||||
debug_nonUniqueAnnotationForCallable
|
||||
debug_missingAnnotationForCall
|
||||
expectedCallEdgeNotFound
|
||||
| example.py:18:1:18:7 | afunc() | foo/bar/a.py:2:1:2:12 | Function afunc |
|
||||
| example.py:19:1:19:7 | afunc() | foo/bar/a.py:2:1:2:12 | Function afunc |
|
||||
| example.py:22:1:22:16 | explicit_afunc() | foo_explicit/bar/a.py:2:1:2:21 | Function explicit_afunc |
|
||||
unexpectedCallEdgeFound
|
||||
|
||||
@@ -13,6 +13,10 @@ Since PEP 420 was accepted in Python 3, this test is Python 3 only.
|
||||
"""
|
||||
|
||||
from foo.bar.a import afunc
|
||||
from foo_explicit.bar.a import explicit_afunc
|
||||
|
||||
# calls:afunc
|
||||
afunc()
|
||||
|
||||
# calls:explicit_afunc
|
||||
explicit_afunc()
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
# name:explicit_afunc
|
||||
def explicit_afunc():
|
||||
print("explicit_afunc called")
|
||||
return 1
|
||||
Reference in New Issue
Block a user