Skip to content

Commit d4249b7

Browse files
committed
Fixed yaml test runner
Signed-off-by: saimedhi <saimedhi@amazon.com>
1 parent 4232717 commit d4249b7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test_opensearchpy/test_server/test_rest_api_spec.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -375,8 +375,12 @@ def run_match(self, action: Any) -> None:
375375
expected = self._resolve(expected)
376376
print("value printed", value)
377377
print("expected printed", expected)
378-
379-
if (isinstance(expected, str) and re.match(r'^/.*/$', expected)):
378+
379+
if (
380+
isinstance(expected, str)
381+
and expected.strip().startswith("/")
382+
and expected.strip().endswith("/")
383+
):
380384
print("entered if")
381385
expected = re.compile(expected[1:-1], re.VERBOSE | re.MULTILINE)
382386
assert expected.search(value), "%r does not match %r" % (

0 commit comments

Comments
 (0)