(lines, prefix)
| 342 | |
| 343 | |
| 344 | def verify_normalize(lines, prefix): |
| 345 | time_re = re.compile(r"[0-9:.]{15}") |
| 346 | src_re = re.compile(r'^(?: *)Source path:\.\.\. (.*)$') |
| 347 | for line in lines: |
| 348 | if DEFAULT_REPR_RE.search(line): |
| 349 | msg = "normalize is active, memory address should not appear" |
| 350 | raise OutputFailure(line, msg) |
| 351 | no_prefix = line.replace(prefix if prefix else '', '').strip() |
| 352 | if time_re.match(no_prefix): |
| 353 | msg = "normalize is active, time should not appear" |
| 354 | raise OutputFailure(line, msg) |
| 355 | m = src_re.match(line) |
| 356 | if m: |
| 357 | if not os.path.basename(m.group(1)) == m.group(1): |
| 358 | msg = "normalize is active, path should be only basename" |
| 359 | raise OutputFailure(line, msg) |
| 360 | |
| 361 | |
| 362 | def assert_output(output, expected_entries, prefix=None, normalize=False): |
no test coverage detected