forked from wala/ML
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pytest entrypoints with PYTHONPATH (#107)
Ignore test for now. Blocked on wala#198.
- Loading branch information
Showing
14 changed files
with
172 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
8 changes: 8 additions & 0 deletions
8
com.ibm.wala.cast.python.test/data/proj48/src/test_module10.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Test https://github.com/wala/ML/issues/163. | ||
|
||
from tensorflow import ones | ||
from src.tf2_test_module9b import D | ||
|
||
|
||
def test_dummy(x, test_input, expected): | ||
D().f(ones([1, 2])) |
9 changes: 9 additions & 0 deletions
9
com.ibm.wala.cast.python.test/data/proj48/src/tf2_test_module9a.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Test https://github.com/wala/ML/issues/163. | ||
|
||
from tensorflow import Tensor | ||
|
||
|
||
class C: | ||
|
||
def f(self, a): | ||
assert isinstance(a, Tensor) |
10 changes: 10 additions & 0 deletions
10
com.ibm.wala.cast.python.test/data/proj48/src/tf2_test_module9b.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Test https://github.com/wala/ML/issues/163. | ||
|
||
from tensorflow import Tensor | ||
from src.tf2_test_module9a import C | ||
|
||
|
||
class D(C): | ||
|
||
def f(self, a): | ||
assert isinstance(a, Tensor) |
Empty file.
9 changes: 9 additions & 0 deletions
9
com.ibm.wala.cast.python.test/data/proj49/src/test_module10.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Test https://github.com/wala/ML/issues/163. | ||
|
||
from tensorflow import ones | ||
from src.tf2_test_module9b import D | ||
|
||
|
||
@pytest.mark.parametrize("test_input,expected", [("3+5", 8), ("2+4", 6), ("6*9", 42)]) | ||
def test_dummy(x, test_input, expected): | ||
D().f(ones([1, 2])) |
9 changes: 9 additions & 0 deletions
9
com.ibm.wala.cast.python.test/data/proj49/src/tf2_test_module9a.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Test https://github.com/wala/ML/issues/163. | ||
|
||
from tensorflow import Tensor | ||
|
||
|
||
class C: | ||
|
||
def f(self, a): | ||
assert isinstance(a, Tensor) |
10 changes: 10 additions & 0 deletions
10
com.ibm.wala.cast.python.test/data/proj49/src/tf2_test_module9b.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Test https://github.com/wala/ML/issues/163. | ||
|
||
from tensorflow import Tensor | ||
from src.tf2_test_module9a import C | ||
|
||
|
||
class D(C): | ||
|
||
def f(self, a): | ||
assert isinstance(a, Tensor) |
10 changes: 10 additions & 0 deletions
10
com.ibm.wala.cast.python.test/data/test_decorated_functions2.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import tensorflow as tf | ||
import pytest | ||
|
||
|
||
def f(a): | ||
assert isinstance(a, tf.Tensor) | ||
|
||
|
||
def test_dummy(x, test_input, expected): | ||
f(tf.constant(1)) |
11 changes: 11 additions & 0 deletions
11
com.ibm.wala.cast.python.test/data/test_decorated_functions3.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import tensorflow as tf | ||
import pytest | ||
|
||
|
||
def f(a): | ||
assert isinstance(a, tf.Tensor) | ||
|
||
|
||
@pytest.mark.parametrize("test_input,expected", [("3+5", 8), ("2+4", 6), ("6*9", 42)]) | ||
def test_dummy(x, test_input, expected): | ||
f(tf.constant(1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 22 additions & 7 deletions
29
com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/types/Util.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters