Skip to content

Commit 6aae757

Browse files
committed
Python: Fix import in type tracking test
Fixes 7855576
1 parent f12fa52 commit 6aae757

File tree

1 file changed

+7
-6
lines changed
  • python/ql/test/experimental/dataflow/typetracking

1 file changed

+7
-6
lines changed

python/ql/test/experimental/dataflow/typetracking/tracked.ql

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import python
2+
import experimental.dataflow.DataFlow
23
import experimental.dataflow.TypeTracker
34
import TestUtilities.InlineExpectationsTest
45

5-
Node tracked(TypeTracker t) {
6+
DataFlow::Node tracked(TypeTracker t) {
67
t.start() and
78
result.asCfgNode() = any(NameNode n | n.getId() = "tracked")
89
or
@@ -15,7 +16,7 @@ class TrackedTest extends InlineExpectationsTest {
1516
override string getARelevantTag() { result = "tracked" }
1617

1718
override predicate hasActualResult(Location location, string element, string tag, string value) {
18-
exists(Node e, TypeTracker t |
19+
exists(DataFlow::Node e, TypeTracker t |
1920
e = tracked(t) and
2021
tag = "tracked" and
2122
location = e.getLocation() and
@@ -25,14 +26,14 @@ class TrackedTest extends InlineExpectationsTest {
2526
}
2627
}
2728

28-
Node int_type(TypeTracker t) {
29+
DataFlow::Node int_type(TypeTracker t) {
2930
t.start() and
3031
result.asCfgNode() = any(CallNode c | c.getFunction().(NameNode).getId() = "int")
3132
or
3233
exists(TypeTracker t2 | result = int_type(t2).track(t2, t))
3334
}
3435

35-
Node string_type(TypeTracker t) {
36+
DataFlow::Node string_type(TypeTracker t) {
3637
t.start() and
3738
result.asCfgNode() = any(CallNode c | c.getFunction().(NameNode).getId() = "str")
3839
or
@@ -45,7 +46,7 @@ class TrackedIntTest extends InlineExpectationsTest {
4546
override string getARelevantTag() { result = "int" }
4647

4748
override predicate hasActualResult(Location location, string element, string tag, string value) {
48-
exists(Node e, TypeTracker t |
49+
exists(DataFlow::Node e, TypeTracker t |
4950
e = int_type(t) and
5051
tag = "int" and
5152
location = e.getLocation() and
@@ -61,7 +62,7 @@ class TrackedStringTest extends InlineExpectationsTest {
6162
override string getARelevantTag() { result = "str" }
6263

6364
override predicate hasActualResult(Location location, string element, string tag, string value) {
64-
exists(Node e, TypeTracker t |
65+
exists(DataFlow::Node e, TypeTracker t |
6566
e = string_type(t) and
6667
tag = "str" and
6768
location = e.getLocation() and

0 commit comments

Comments
 (0)