Files
mtusi2026lab2/evidence/track1-sqlalchemy/diagnostics/order-regression.txt
T

47 lines
2.0 KiB
Plaintext

date: 2026-11-05T21:42:07.200053+00:00 commit: 57744c532c58d3e2bd248b4368ecba0a42402ed8 + pending regression test
$ .venv/bin/pytest student-tests/unit/test_scaling.py -k test_series_order -q
F. [100%]
=================================== FAILURES ===================================
______________________ test_series_order[True-expected0] _______________________
scaling = <module 'scaling' from '<repo>/scripts/scaling.py'>
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x1128cda70>
fixed = True
expected = [('4x1', [2]), ('8x0.5', [2]), ('4x1', [3]), ('8x0.5', [3])]
@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
E AssertionError: assert [('4x1', [2, ...0.5', [2, 3])] == [('4x1', [2])...'8x0.5', [3])]
E
E At index 0 diff: ('4x1', [2, 3]) != ('4x1', [2])
E Right contains 2 more items, first extra item: ('4x1', [3])
E Use -v to get more diff
student-tests/unit/test_scaling.py:80: AssertionError
=========================== short test summary info ============================
FAILED student-tests/unit/test_scaling.py::test_series_order[True-expected0]
1 failed, 1 passed, 3 deselected in 0.03s
exit: 1; expected failure before runner fix