Skip to content

Commit 01d426d

Browse files
committed
Python: Replace rest of from testlib import *
I think we should write our tests in a way that puts points-to in the best condition to resolve calls. Although this specific change did not change much, it should help set us up for success in the future 👍
1 parent ead0b65 commit 01d426d

File tree

9 files changed

+11
-9
lines changed

9 files changed

+11
-9
lines changed

python/ql/test/experimental/dataflow/coverage/argumentPassing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import functools
44

55
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
6-
from testlib import *
6+
from testlib import expects
77

88
arg = "source"
99
arg1 = "source1"

python/ql/test/experimental/dataflow/coverage/classes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import os
1313

1414
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
15-
from testlib import *
15+
from testlib import expects
1616

1717
import asyncio
1818

python/ql/test/experimental/dataflow/coverage/classesCallGraph.expected

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
| classes.py:45:16:45:35 | ControlFlowNode for Attribute() | classes.py:45:16:45:35 | ControlFlowNode for Attribute() |
22
| classes.py:60:17:60:27 | [pre objCreate] ControlFlowNode for With_init() | classes.py:54:18:54:21 | ControlFlowNode for self |
3+
| classes.py:242:9:242:24 | ControlFlowNode for set() | classes.py:242:9:242:24 | ControlFlowNode for set() |
4+
| classes.py:247:9:247:30 | ControlFlowNode for frozenset() | classes.py:247:9:247:30 | ControlFlowNode for frozenset() |
5+
| classes.py:252:9:252:28 | ControlFlowNode for dict() | classes.py:252:9:252:28 | ControlFlowNode for dict() |
36
| classes.py:565:5:565:16 | ControlFlowNode for with_getitem | classes.py:555:21:555:24 | ControlFlowNode for self |
47
| classes.py:565:18:565:21 | ControlFlowNode for arg2 | classes.py:555:27:555:29 | ControlFlowNode for key |
58
| classes.py:581:5:581:16 | ControlFlowNode for with_setitem | classes.py:570:21:570:24 | ControlFlowNode for self |

python/ql/test/experimental/dataflow/coverage/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import os
1414

1515
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
16-
from testlib import *
16+
from testlib import expects
1717

1818
# These are defined so that we can evaluate the test code.
1919
NONSOURCE = "not a source"

python/ql/test/experimental/dataflow/match/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import os
44

55
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
6-
from testlib import *
6+
from testlib import expects
77

88
# These are defined so that we can evaluate the test code.
99
NONSOURCE = "not a source"

python/ql/test/experimental/dataflow/module-initialization/multiphase.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import os #$ importTimeFlow="ImportExpr -> GSSA Variable os"
33

44
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
5-
from testlib import *
5+
from testlib import expects #$ importTimeFlow="ImportMember -> GSSA Variable expects"
66

77
# These are defined so that we can evaluate the test code.
88
NONSOURCE = "not a source" #$ importTimeFlow="'not a source' -> GSSA Variable NONSOURCE"

python/ql/test/experimental/dataflow/variable-capture/dict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import os
99

1010
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
11-
from testlib import *
11+
from testlib import expects
1212

1313
# These are defined so that we can evaluate the test code.
1414
NONSOURCE = "not a source"

python/ql/test/experimental/dataflow/variable-capture/in.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88

99
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
10-
from testlib import *
10+
from testlib import expects
1111

1212
# These are defined so that we can evaluate the test code.
1313
NONSOURCE = "not a source"
@@ -93,4 +93,3 @@ def m():
9393
@expects(3)
9494
def test_inLocal():
9595
inLocal()
96-

python/ql/test/experimental/dataflow/variable-capture/nonlocal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import os
99

1010
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
11-
from testlib import *
11+
from testlib import expects
1212

1313
# These are defined so that we can evaluate the test code.
1414
NONSOURCE = "not a source"

0 commit comments

Comments
 (0)