Skip to content

Commit

Permalink
Additional testing.
Browse files Browse the repository at this point in the history
  • Loading branch information
khatchad committed Jul 9, 2024
1 parent 8440ed0 commit 5429d46
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2662,6 +2662,20 @@ public void testModule57()
new int[] {3});
}

/** Test https://github.com/wala/ML/issues/202. */
@Test
public void testModule58()
throws ClassHierarchyException, IllegalArgumentException, CancelException, IOException {
test(
new String[] {"proj55/src/__init__.py", "proj55/src/B.py", "proj55/A.py"},
"src/B.py",
"C.f",
"proj55",
1,
1,
new int[] {3});
}

@Test
public void testStaticMethod() throws ClassHierarchyException, CancelException, IOException {
test("tf2_test_static_method.py", "MyClass.the_static_method", 1, 1, 2);
Expand Down
1 change: 1 addition & 0 deletions com.ibm.wala.cast.python.test/.pydevproject
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
<path>/${PROJECT_DIR_NAME}/data/proj50</path>
<path>/${PROJECT_DIR_NAME}/data/proj51</path>
<path>/${PROJECT_DIR_NAME}/data/proj52</path>
<path>/${PROJECT_DIR_NAME}/data/proj55</path>
</pydev_pathproperty>
</pydev_project>
6 changes: 6 additions & 0 deletions com.ibm.wala.cast.python.test/data/proj55/A.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Test https://github.com/wala/ML/issues/163.

from tensorflow import ones
from src import C

C().f(ones([1, 2]))
9 changes: 9 additions & 0 deletions com.ibm.wala.cast.python.test/data/proj55/src/B.py
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)
1 change: 1 addition & 0 deletions com.ibm.wala.cast.python.test/data/proj55/src/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .B import C

0 comments on commit 5429d46

Please sign in to comment.