-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
95 additions
and
2 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
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
41 changes: 41 additions & 0 deletions
41
com.ibm.wala.cast.python.test/data/tf2_test_decorated_functions.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,41 @@ | ||
import tensorflow | ||
import pytest | ||
import sys | ||
|
||
|
||
@tensorflow.autograph.experimental.do_not_convert | ||
def dummy_fun(a): | ||
pass | ||
|
||
|
||
@pytest.mark.parametrize("test_input,expected", [("3+5", 8), ("2+4", 6), ("6*9", 42)]) | ||
def dummy_test(x, test_input, expected): | ||
pass | ||
|
||
|
||
@pytest.mark.skipif(sys.version_info < (3, 10), reason="requires python3.10 or higher") | ||
def test_function(x): | ||
pass | ||
|
||
|
||
@pytest.mark.skip(reason="requires python3.10 or higher") | ||
def test_function2(x): | ||
pass | ||
|
||
|
||
@pytest.mark.skip("requires python3.10 or higher") | ||
def test_function3(x): | ||
pass | ||
|
||
|
||
@pytest.mark.skip | ||
def test_function4(x): | ||
pass | ||
|
||
|
||
dummy_fun(tensorflow.constant(1)) | ||
dummy_test(tensorflow.constant(1), "1", "1") | ||
test_function(tensorflow.constant(1)) | ||
test_function2(tensorflow.constant(1)) | ||
test_function3(tensorflow.constant(1)) | ||
test_function4(tensorflow.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