aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/kernel_tests/regex_replace_op_test.py
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/python/kernel_tests/regex_replace_op_test.py')
-rw-r--r--tensorflow/python/kernel_tests/regex_replace_op_test.py27
1 files changed, 12 insertions, 15 deletions
diff --git a/tensorflow/python/kernel_tests/regex_replace_op_test.py b/tensorflow/python/kernel_tests/regex_replace_op_test.py
index f0e84b8fca..feac3a8b08 100644
--- a/tensorflow/python/kernel_tests/regex_replace_op_test.py
+++ b/tensorflow/python/kernel_tests/regex_replace_op_test.py
@@ -20,7 +20,6 @@ from __future__ import print_function
from absl.testing import parameterized
-from tensorflow.python.compat import compat
from tensorflow.python.framework import constant_op
from tensorflow.python.framework import dtypes
from tensorflow.python.ops import gen_string_ops
@@ -100,22 +99,20 @@ class RegexReplaceTest(test.TestCase, parameterized.TestCase):
(as_tensor, as_string),
(as_tensor, as_tensor))
def testRegexReplaceDelegation(self, pattern_fn, rewrite_fn):
- with compat.forward_compatibility_horizon(2018, 10, 11):
- with self.test_session():
- input_vector = constant_op.constant("foo", dtypes.string)
- pattern = pattern_fn("[a-z]")
- replace = rewrite_fn(".")
- op = string_ops.regex_replace(input_vector, pattern, replace)
- self.assertTrue(op.name.startswith("RegexReplace"))
+ with self.test_session():
+ input_vector = constant_op.constant("foo", dtypes.string)
+ pattern = pattern_fn("[a-z]")
+ replace = rewrite_fn(".")
+ op = string_ops.regex_replace(input_vector, pattern, replace)
+ self.assertTrue(op.name.startswith("RegexReplace"))
def testStaticRegexReplaceDelegation(self):
- with compat.forward_compatibility_horizon(2018, 10, 11):
- with self.test_session():
- input_vector = constant_op.constant("foo", dtypes.string)
- pattern = "[a-z]"
- replace = "."
- op = string_ops.regex_replace(input_vector, pattern, replace)
- self.assertTrue(op.name.startswith("StaticRegexReplace"))
+ with self.test_session():
+ input_vector = constant_op.constant("foo", dtypes.string)
+ pattern = "[a-z]"
+ replace = "."
+ op = string_ops.regex_replace(input_vector, pattern, replace)
+ self.assertTrue(op.name.startswith("StaticRegexReplace"))
if __name__ == "__main__":
test.main()