Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed YAML test runner for failing search/highlight/30_max_analyzed_offset[5] test #696

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions test_opensearchpy/test_server/test_rest_api_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,10 +371,10 @@ def run_match(self, action: Any) -> None:

if (
isinstance(expected, str)
and expected.startswith("/")
and expected.endswith("/")
and expected.strip().startswith("/")
and expected.strip().endswith("/")
):
expected = re.compile(expected[1:-1], re.VERBOSE | re.MULTILINE)
expected = re.compile(expected.strip()[1:-1], re.VERBOSE | re.MULTILINE)
assert expected.search(value), "%r does not match %r" % (
value,
expected,
Expand Down Expand Up @@ -417,9 +417,7 @@ def _resolve(self, value: Any) -> Any:
value = value.replace(key_replace, v)
break

if isinstance(value, string_types):
value = value.strip()
elif isinstance(value, dict):
if isinstance(value, dict):
value = dict((k, self._resolve(v)) for (k, v) in value.items())
elif isinstance(value, list):
value = list(map(self._resolve, value))
Expand Down
Loading