Skip to content

Commit

Permalink
unit test for reduce_join
Browse files Browse the repository at this point in the history
  • Loading branch information
f-salvetti committed Dec 2, 2022
1 parent 8612b1a commit 3eee0f1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/test_string_ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ def func(text1, text2, text3):
return tf.identity(x_, name=_TFOUTPUT)
self._run_test_case(func, [_OUTPUT], {_INPUT: text_val1, _INPUT1: text_val2, _INPUT2: text_val3})

@requires_custom_ops("ReduceJoin")
def test_reduce_join(self):
text_val = np.array([["a", "Test 1 2 3"], ["b", "test test"], ["c", "Hi there Test"]], dtype=np.str)
def func(text):
x_ = tf.strings.reduce_join(text, axis=1, separator="±")
return tf.identity(x_, name=_TFOUTPUT)
self._run_test_case(func, [_OUTPUT], {_INPUT: text_val})

@requires_custom_ops("StringSplit")
@check_tf_min_version("2.0", "result is sparse not ragged in tf1")
def test_string_split(self):
Expand Down

0 comments on commit 3eee0f1

Please sign in to comment.