Lines Matching refs:regex

407     def regex_search(self, regex, output):
408 match = re.search(regex, output, re.MULTILINE)
410 self.fail("%r not found in %r" % (regex, output))
413 def check_line(self, output, regex):
414 regex = re.compile(r'^' + regex, re.MULTILINE)
415 self.assertRegex(output, regex)
418 regex = (r'^%s\[ *[0-9]+(?:/ *[0-9]+)*\] (%s)'
420 parser = re.finditer(regex, output, re.MULTILINE)
453 regex = line_format % (count, plural(count))
454 regex = r'%s:\n %s$' % (regex, names)
455 return regex
458 regex = list_regex('%s test%s skipped', skipped)
459 self.check_line(output, regex)
462 regex = list_regex('%s test%s failed', failed)
463 self.check_line(output, regex)
466 regex = list_regex('%s test%s altered the execution environment',
468 self.check_line(output, regex)
471 regex = list_regex('%s test%s omitted', omitted)
472 self.check_line(output, regex)
475 regex = list_regex('%s re-run test%s', rerun.keys())
476 self.check_line(output, regex)
477 regex = LOG_PREFIX + r"Re-running failed tests in verbose mode"
478 self.check_line(output, regex)
480 regex = LOG_PREFIX + f"Re-running {name} in verbose mode \\(matching: {match}\\)"
481 self.check_line(output, regex)
484 regex = list_regex('%s test%s run no tests', no_test_ran)
485 self.check_line(output, regex)
490 regex = r'%s test%s OK\.$' % (good, plural(good))
492 regex = 'All %s' % regex
493 self.check_line(output, regex)
832 regex = ('10 slowest tests:\n'
835 self.check_line(output, regex)
852 regex = ('10 slowest tests:\n')
853 self.check_line(output, regex)
860 regex = (r'lines +cov% +module +\(path\)\n'
862 self.check_line(output, regex)
984 regex = re.compile("^(test[^ ]+).*ok$", flags=re.MULTILINE)
985 return [match.group(1) for match in regex.finditer(output)]
1486 regex = (r"test_print_warning.*msg1: stdout\n"
1496 self.assertRegex(output, regex)