aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/saved_model
diff options
context:
space:
mode:
authorGravatar Skye Wanderman-Milne <skyewm@google.com>2018-05-16 18:03:01 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-16 18:06:14 -0700
commit0c33e1ff58e121a0cf6acdb6aeb8de53cb3abf25 (patch)
tree42d8a74609e78bffda238c3f8f0538bfdf61a80c /tensorflow/python/saved_model
parent1511cf2f51965151147d1ca2e822439c6656b821 (diff)
Remove _USE_C_API staging in tests now that the C API is enabled by default.
This is in preparation for removing the _USE_C_API toggle altogether. PiperOrigin-RevId: 196920481
Diffstat (limited to 'tensorflow/python/saved_model')
-rw-r--r--tensorflow/python/saved_model/saved_model_test.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/tensorflow/python/saved_model/saved_model_test.py b/tensorflow/python/saved_model/saved_model_test.py
index a4d994fd43..1b83d60df9 100644
--- a/tensorflow/python/saved_model/saved_model_test.py
+++ b/tensorflow/python/saved_model/saved_model_test.py
@@ -53,12 +53,9 @@ def tearDownModule():
file_io.delete_recursively(test.get_temp_dir())
-@test_util.with_c_api
class SavedModelTest(test.TestCase):
def _get_export_dir(self, label):
- if ops._USE_C_API:
- label += "_c_api"
return os.path.join(test.get_temp_dir(), label)
def _init_and_validate_variable(self, sess, variable_name, variable_value):
@@ -1118,12 +1115,8 @@ class SavedModelTest(test.TestCase):
# does not have any attr values for the "TestAttr" node, and there is no
# default specified in the TestAttr OpDef.
sess = session.Session(graph=ops.Graph())
- if ops._USE_C_API:
- error_message = "NodeDef missing attr 'T' from Op<name=TestAttr"
- else:
- error_message = ("Expected one attr with name .*T(out)?.* in name: "
- "\"test_attr\".*")
- with self.assertRaisesRegexp(ValueError, error_message):
+ with self.assertRaisesRegexp(
+ ValueError, "NodeDef missing attr 'T' from Op<name=TestAttr"):
loader.load(sess, ["foo"], export_dir)
# Rewrite the SavedModel to change the type of the T attr in "test_attr"