forked from tensorflow/addons
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable pytest and bazel tests. (tensorflow#1243)
* Enable pytest AND bazel tests. * Added an example of plain test function. * Use tf-cpu with bazel. * Used OLDEST_PY_VERSION * Fix oldest py vesion. * Added a comment for python3 * Add bazel clean.
- Loading branch information
1 parent
7d547cf
commit 00bef8b
Showing
15 changed files
with
117 additions
and
114 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
.git | ||
.github | ||
*.Dockerfile | ||
|
||
.coverage* | ||
# C extensions | ||
*.so |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,3 +37,6 @@ wheels/ | |
/bazel-* | ||
/artifacts | ||
.bazelrc | ||
|
||
.coverage* | ||
htmlcov |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
import unittest | ||
import sys | ||
|
||
import pytest | ||
import tensorflow as tf | ||
from tensorflow_addons.register import register_all, _get_all_shared_objects | ||
|
||
|
||
class AssertRNNCellTest(unittest.TestCase): | ||
def test_multiple_register(self): | ||
register_all() | ||
register_all() | ||
def test_multiple_register(): | ||
register_all() | ||
register_all() | ||
|
||
|
||
def test_get_all_shared_objects(self): | ||
all_shared_objects = _get_all_shared_objects() | ||
self.assertTrue(len(all_shared_objects) >= 4) | ||
def test_get_all_shared_objects(): | ||
all_shared_objects = _get_all_shared_objects() | ||
assert len(all_shared_objects) >= 4 | ||
|
||
for file in all_shared_objects: | ||
tf.load_op_library(file) | ||
for file in all_shared_objects: | ||
tf.load_op_library(file) | ||
|
||
|
||
if __name__ == "__main__": | ||
unittest.main() | ||
sys.exit(pytest.main([__file__])) |
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
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
Oops, something went wrong.