diff options
-rw-r--r-- | tensorflow/python/kernel_tests/resource_variable_ops_test.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tensorflow/python/kernel_tests/resource_variable_ops_test.py b/tensorflow/python/kernel_tests/resource_variable_ops_test.py index 7b131a5b8c..b4b555591d 100644 --- a/tensorflow/python/kernel_tests/resource_variable_ops_test.py +++ b/tensorflow/python/kernel_tests/resource_variable_ops_test.py @@ -38,6 +38,7 @@ from tensorflow.python.ops import variables from tensorflow.python.platform import test +@test_util.with_c_api class ResourceVariableOpsTest(test_util.TensorFlowTestCase): def tearDown(self): @@ -342,14 +343,14 @@ class ResourceVariableOpsTest(test_util.TensorFlowTestCase): v = resource_variable_ops.ResourceVariable( 2.0, caching_device="/job:localhost") self.assertEqual("/job:localhost", v.value().device) - with self.assertRaisesRegexp(ValueError, "No attr named '_class'"): + with self.assertRaises(ValueError): _ = v.value().op.get_attr("_class") with ops.colocate_with(v.op): w = resource_variable_ops.ResourceVariable( 2.0, caching_device="/job:localhost") self.assertEqual("/job:localhost", w.value().device) - with self.assertRaisesRegexp(ValueError, "No attr named '_class'"): + with self.assertRaises(ValueError): _ = w.value().op.get_attr("_class") def testSharedName(self): |