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)
| 341 | assert expected_results == actual_results |
| 342 | |
| 343 | def 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 | |
| 359 | def 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 |
no test coverage detected