Skip to content

Commit 5a18bc1

Browse files
authoredApr 21, 2024
[TF FE] Extend StringSplitV2 layer tests and fix warnings (openvinotoolkit#24148)
**Details:** Extend StringSplitV2 layer tests and fix warnings. Merge after openvinotoolkit/openvino_tokenizers#121 **Ticket:** TBD --------- Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
1 parent 254296e commit 5a18bc1

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎tests/layer_tests/tensorflow_tests/test_tf_Equal.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def _prepare_input(self, inputs_info):
223223
x_shape = inputs_info['x:0']
224224
y_shape = inputs_info['y:0']
225225
inputs_data = {}
226-
strings_dictionary = ['UPPER<>CASE SENTENCE', 'lower case\n\s sentence', ' UppEr LoweR CAse SENtence \t\n',
226+
strings_dictionary = ['UPPER<>CASE SENTENCE', 'lower case\n sentence', ' UppEr LoweR CAse SENtence \t\n',
227227
' some sentence', 'another sentence HERE ']
228228
inputs_data['x:0'] = rng.choice(strings_dictionary, x_shape)
229229
inputs_data['y:0'] = rng.choice(strings_dictionary, y_shape)

‎tests/layer_tests/tensorflow_tests/test_tf_StaticRegexReplace.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def create_static_regex_replace_net(self, input_shape, pattern, rewrite, replace
3636
return tf_net, ref_net
3737

3838
@pytest.mark.parametrize('input_shape', [[], [2], [3, 4], [1, 3, 2]])
39-
@pytest.mark.parametrize('pattern', ['(\s)|(-)', '[A-Z]{2,}', '^\s+|\s+$'])
39+
@pytest.mark.parametrize('pattern', [r'(\s)|(-)', r'[A-Z]{2,}', r'^\s+|\s+$'])
4040
@pytest.mark.parametrize('rewrite', ['', 'replacement word'])
4141
@pytest.mark.parametrize('replace_global', [None, True, False])
4242
@pytest.mark.precommit

‎tests/layer_tests/tensorflow_tests/test_tf_StringSplitV2.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def _prepare_input(self, inputs_info):
1717
assert 'input:0' in inputs_info
1818
input_shape = inputs_info['input:0']
1919
inputs_data = {}
20-
strings_dictionary = ['UPPER<>CASE SENTENCE', 'lower case\n\s sentence', ' UppEr LoweR CAse SENtence \t\n',
20+
strings_dictionary = ['UPPER<>CASE SENTENCE', 'lower case\n sentence', ' UppEr LoweR CAse SENtence \t\n',
2121
' some sentence', 'another sentence HERE ']
2222
inputs_data['input:0'] = rng.choice(strings_dictionary, input_shape)
2323
return inputs_data
@@ -39,7 +39,7 @@ def create_string_split_v2_net(self, input_shape, sep, maxsplit):
3939

4040
@pytest.mark.parametrize('input_shape', [[1], [2], [5]])
4141
@pytest.mark.parametrize('sep', ['', '<>'])
42-
@pytest.mark.parametrize('maxsplit', [None, -1])
42+
@pytest.mark.parametrize('maxsplit', [None, -1, 5, 10])
4343
@pytest.mark.precommit
4444
@pytest.mark.nightly
4545
@pytest.mark.xfail(condition=platform.system() in ('Darwin', 'Linux') and platform.machine() in ['arm', 'armv7l',

0 commit comments

Comments
 (0)