MCPcopy Create free account
hub / github.com/apache/impala / check_multiline

Method check_multiline

tests/shell/test_shell_commandline.py:1666–1676  ·  view source on GitHub ↗

Build and runs a multi-line regular expression against both the shell's stdout and rpc file contents to ensure the expected data about the hs2 rpc calls was outputted.

(check_desc, regex_lines)

Source from the content-addressed store, hash-verified

1664 .format(stdout_data_rpc_only, rpc_file_data)
1665
1666 def check_multiline(check_desc, regex_lines):
1667 """Build and runs a multi-line regular expression against both the
1668 shell's stdout and rpc file contents to ensure the expected data about
1669 the hs2 rpc calls was outputted."""
1670 the_re = re.compile("^" + "\n".join(regex_lines) + "$", re.MULTILINE)
1671 assert the_re.search(stdout_data), \
1672 "'{0}' assert failed in stdout: \n{1}" \
1673 .format(check_desc, stdout_data)
1674 assert the_re.search(rpc_file_data), \
1675 "'{0}' assert failed in the rpc file contents: \n{1}" \
1676 .format(check_desc, rpc_file_data)
1677
1678 check_multiline("Open Session Request",
1679 [

Callers

nothing calls this directly

Calls 3

joinMethod · 0.45
searchMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected