aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/platform
diff options
context:
space:
mode:
authorGravatar Anna R <annarev@google.com>2018-03-13 15:51:36 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-13 17:06:54 -0700
commitd57f0213bff0c676b06f4b3f0842ac282738c254 (patch)
treead1cf51ae4a47a74a2c56426de2246c3676943f6 /tensorflow/python/platform
parent86dd46a3c65c3bcdf92b7ea3ab33bc99ece58236 (diff)
Add test for API generated with tf_export calls to api_compatibility_test.py.
Also, fix remaining differences between this new API and the current TensorFlow API. PiperOrigin-RevId: 188943768
Diffstat (limited to 'tensorflow/python/platform')
-rw-r--r--tensorflow/python/platform/googletest.py2
-rw-r--r--tensorflow/python/platform/test.py2
2 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/python/platform/googletest.py b/tensorflow/python/platform/googletest.py
index 96219faab7..8141cf92c5 100644
--- a/tensorflow/python/platform/googletest.py
+++ b/tensorflow/python/platform/googletest.py
@@ -36,6 +36,7 @@ from tensorflow.python.platform import benchmark
from tensorflow.python.platform import tf_logging as logging
from tensorflow.python.util import tf_decorator
from tensorflow.python.util import tf_inspect
+from tensorflow.python.util.tf_export import tf_export
Benchmark = benchmark.TensorFlowBenchmark # pylint: disable=invalid-name
@@ -138,6 +139,7 @@ def StatefulSessionAvailable():
return False
+@tf_export('test.StubOutForTesting')
class StubOutForTesting(object):
"""Support class for stubbing methods out for unit testing.
diff --git a/tensorflow/python/platform/test.py b/tensorflow/python/platform/test.py
index 9b7655722a..1660791feb 100644
--- a/tensorflow/python/platform/test.py
+++ b/tensorflow/python/platform/test.py
@@ -62,6 +62,8 @@ if sys.version_info.major == 2:
else:
from unittest import mock # pylint: disable=g-import-not-at-top
+tf_export('test.mock')(mock)
+
# Import Benchmark class
Benchmark = _googletest.Benchmark # pylint: disable=invalid-name