forked from mtusi2026/mtusi2026lab3
Alternate fixed-rate scaling configurations across repeats
This commit is contained in:
@@ -52,3 +52,29 @@ def test_disturbed_runs_never_enter_summary(
|
||||
scaling.block(args, output, "1x1", "base", [1])
|
||||
output.writerows.assert_not_called()
|
||||
assert args.rejected.writerow.call_count == 2
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
("fixed", "expected"),
|
||||
[
|
||||
(True, [("4x1", [2]), ("8x0.5", [2]), ("4x1", [3]), ("8x0.5", [3])]),
|
||||
(False, [("4x1", [2, 3]), ("8x0.5", [2, 3])]),
|
||||
],
|
||||
)
|
||||
def test_series_order(
|
||||
scaling: ModuleType,
|
||||
monkeypatch: pytest.MonkeyPatch,
|
||||
fixed: bool,
|
||||
expected: list[tuple[str, list[int]]],
|
||||
) -> None:
|
||||
args = SimpleNamespace(
|
||||
first_repeat=2,
|
||||
repeats=2,
|
||||
configs="4x1,8x0.5",
|
||||
variants=["pinned"],
|
||||
rates="3040,4560" if fixed else None,
|
||||
)
|
||||
block = Mock()
|
||||
monkeypatch.setattr(scaling, "block", block)
|
||||
scaling.series(args, Mock())
|
||||
assert [(call.args[2], list(call.args[4])) for call in block.call_args_list] == expected
|
||||
|
||||
Reference in New Issue
Block a user