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

Function verify_errors

tests/common/test_result_verifier.py:343–357  ·  view source on GitHub ↗

Convert the errors to our test format, treating them as a single string column row set if not a row_regex. This requires enclosing the data in single quotes.

(expected_errors, actual_errors)

Source from the content-addressed store, hash-verified

341 assert expected_results == actual_results
342
343def verify_errors(expected_errors, actual_errors):
344 """Convert the errors to our test format, treating them as a single string column row
345 set if not a row_regex. This requires enclosing the data in single quotes."""
346 converted_expected_errors = []
347 for expected_error in expected_errors:
348 if not expected_error: continue
349 if ROW_REGEX_PREFIX.match(expected_error):
350 converted_expected_errors.append(expected_error)
351 else:
352 converted_expected_errors.append("'%s'" % expected_error)
353 expected = QueryTestResult(converted_expected_errors, ['STRING'], ['DUMMY_LABEL'],
354 order_matters=False)
355 actual = QueryTestResult(["'%s'" % l for l in actual_errors if l], ['STRING'],
356 ['DUMMY_LABEL'], order_matters=False)
357 VERIFIER_MAP['VERIFY_IS_EQUAL'](expected, actual)
358
359def apply_error_match_filter(error_list, replace_filenames=True):
360 """Applies a filter to each entry in the given list of errors to ensure result matching

Callers 1

verify_raw_resultsFunction · 0.85

Calls 3

QueryTestResultClass · 0.85
matchMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected