|
5 | 5 | """Unit tests for `grizzly.reduce.reduce`.""" |
6 | 6 |
|
7 | 7 | from collections import namedtuple |
8 | | -from functools import partial, wraps |
| 8 | +from functools import wraps |
9 | 9 | from itertools import count |
10 | 10 | from logging import getLogger |
11 | 11 | from pathlib import Path |
@@ -430,7 +430,7 @@ def wrapped(_): |
430 | 430 | detect_failure=lambda contents: set(contents.splitlines()) >= set("135"), |
431 | 431 | interesting_str="%r contains {'1', '3', '5'}", |
432 | 432 | is_expected=lambda contents: contents != "1\n3\n5\n", |
433 | | - expected_run_calls=13, |
| 433 | + expected_run_calls=12, |
434 | 434 | n_reports=2, |
435 | 435 | reports={"1\n2\n3\n4\n5\n6\n", "1\n2\n3\n5\n"}, |
436 | 436 | n_other=1, |
@@ -468,7 +468,7 @@ def wrapped(_): |
468 | 468 | ), |
469 | 469 | interesting_str="%r contains {'A1\\n', 'A3\\n', 'A5\\n'}", |
470 | 470 | is_expected=lambda _: True, |
471 | | - expected_run_calls=34, |
| 471 | + expected_run_calls=32, |
472 | 472 | # lines found nothing, only check and chars should report |
473 | 473 | n_reports=2, |
474 | 474 | reports={"A1\nA2\nA3\nA4\nA5\nA6\n", "A1\nA3\nA5\n"}, |
@@ -507,22 +507,6 @@ def wrapped(_): |
507 | 507 | other_reports=None, |
508 | 508 | result=0, |
509 | 509 | ), |
510 | | - # reproduces, two strategies, 1st no reduce, 2nd testcase reduces to 0 |
511 | | - ReproTestParams( |
512 | | - original=b"1\n2\n3\n", |
513 | | - strategies=["check", "lines", "lines"], |
514 | | - detect_failure=_ignore_arg( |
515 | | - partial([True, False, False, False, False, True, True, True].pop, 0) |
516 | | - ), |
517 | | - interesting_str="%r is anything, only in second strategy", |
518 | | - is_expected=lambda _: True, |
519 | | - expected_run_calls=8, |
520 | | - n_reports=2, |
521 | | - reports={"1\n2\n3\n", ""}, |
522 | | - n_other=0, |
523 | | - other_reports=None, |
524 | | - result=0, |
525 | | - ), |
526 | 510 | ], |
527 | 511 | ) |
528 | 512 | @mark.usefixtures("reporter_sequential_strftime") |
|
0 commit comments