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 👍
This commit is contained in:
Rasmus Wriedt Larsen
2022-02-28 10:40:55 +01:00
parent ead0b658d2
commit 01d426dc58
9 changed files with 11 additions and 9 deletions

View File

@@ -3,7 +3,7 @@ import os
import functools
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
from testlib import expects
arg = "source"
arg1 = "source1"

View File

@@ -12,7 +12,7 @@ import sys
import os
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
from testlib import expects
import asyncio

View File

@@ -1,5 +1,8 @@
| classes.py:45:16:45:35 | ControlFlowNode for Attribute() | classes.py:45:16:45:35 | ControlFlowNode for Attribute() |
| classes.py:60:17:60:27 | [pre objCreate] ControlFlowNode for With_init() | classes.py:54:18:54:21 | ControlFlowNode for self |
| classes.py:242:9:242:24 | ControlFlowNode for set() | classes.py:242:9:242:24 | ControlFlowNode for set() |
| classes.py:247:9:247:30 | ControlFlowNode for frozenset() | classes.py:247:9:247:30 | ControlFlowNode for frozenset() |
| classes.py:252:9:252:28 | ControlFlowNode for dict() | classes.py:252:9:252:28 | ControlFlowNode for dict() |
| classes.py:565:5:565:16 | ControlFlowNode for with_getitem | classes.py:555:21:555:24 | ControlFlowNode for self |
| classes.py:565:18:565:21 | ControlFlowNode for arg2 | classes.py:555:27:555:29 | ControlFlowNode for key |
| classes.py:581:5:581:16 | ControlFlowNode for with_setitem | classes.py:570:21:570:24 | ControlFlowNode for self |

View File

@@ -13,7 +13,7 @@ import sys
import os
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
from testlib import expects
# These are defined so that we can evaluate the test code.
NONSOURCE = "not a source"

View File

@@ -3,7 +3,7 @@ import sys
import os
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
from testlib import expects
# These are defined so that we can evaluate the test code.
NONSOURCE = "not a source"

View File

@@ -2,7 +2,7 @@ import sys #$ importTimeFlow="ImportExpr -> GSSA Variable sys"
import os #$ importTimeFlow="ImportExpr -> GSSA Variable os"
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
from testlib import expects #$ importTimeFlow="ImportMember -> GSSA Variable expects"
# These are defined so that we can evaluate the test code.
NONSOURCE = "not a source" #$ importTimeFlow="'not a source' -> GSSA Variable NONSOURCE"

View File

@@ -8,7 +8,7 @@ import sys
import os
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
from testlib import expects
# These are defined so that we can evaluate the test code.
NONSOURCE = "not a source"

View File

@@ -7,7 +7,7 @@ import sys
import os
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
from testlib import expects
# These are defined so that we can evaluate the test code.
NONSOURCE = "not a source"
@@ -93,4 +93,3 @@ def inLocal():
@expects(3)
def test_inLocal():
inLocal()

View File

@@ -8,7 +8,7 @@ import sys
import os
sys.path.append(os.path.dirname(os.path.dirname((__file__))))
from testlib import *
from testlib import expects
# These are defined so that we can evaluate the test code.
NONSOURCE = "not a source"