Skip to content

Commit ab42521

Browse files
committed
Python: Port CallGraph-implicit-init tests
to the new call-graph test setup. Nice that we can write `MISSING:` now!
1 parent b60504f commit ab42521

File tree

11 files changed

+11
-29
lines changed

11 files changed

+11
-29
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
failures
2+
debug_callableNotUnique
3+
pointsTo_found_typeTracker_notFound
4+
| example.py:22:1:22:16 | ControlFlowNode for explicit_afunc() | explicit_afunc |
5+
typeTracker_found_pointsTo_notFound
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../CallGraph/InlineCallGraphTest.ql

python/ql/test/experimental/library-tests/CallGraph-implicit-init/PointsTo.expected

Lines changed: 0 additions & 6 deletions
This file was deleted.

python/ql/test/experimental/library-tests/CallGraph-implicit-init/PointsTo.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.

python/ql/test/experimental/library-tests/CallGraph-implicit-init/Relative.expected

Lines changed: 0 additions & 6 deletions
This file was deleted.

python/ql/test/experimental/library-tests/CallGraph-implicit-init/Relative.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.

python/ql/test/experimental/library-tests/CallGraph-implicit-init/TypeTracker.expected

Lines changed: 0 additions & 7 deletions
This file was deleted.

python/ql/test/experimental/library-tests/CallGraph-implicit-init/TypeTracker.qlref

Lines changed: 0 additions & 1 deletion
This file was deleted.

python/ql/test/experimental/library-tests/CallGraph-implicit-init/example.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@
55
understanding import work properly, so it's better to have a clean test setup that is
66
obviously correct (the other one isn't in regards to imports).
77
8-
Technically this is part of PEP 420 -- Implicit Namespace Packages, but does use the
8+
Technically this is part of PEP 420 -- Implicit Namespace Packages, but does not use the
99
*real* namespace package feature of allowing source code for a single package to reside
1010
in multiple places.
1111
12+
Maybe this should have been an import resolution test, and not a call-graph test ¯\_(ツ)_/¯
13+
1214
Since PEP 420 was accepted in Python 3, this test is Python 3 only.
1315
"""
1416

1517
from foo.bar.a import afunc
1618
from foo_explicit.bar.a import explicit_afunc
1719

18-
# calls:afunc
19-
afunc()
20+
afunc() # $ MISSING: pt,tt=afunc
2021

21-
# calls:explicit_afunc
22-
explicit_afunc()
22+
explicit_afunc() # $ pt=explicit_afunc MISSING: tt=explicit_afunc
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# name:afunc
21
def afunc():
32
print("afunc called")
43
return 1

0 commit comments

Comments
 (0)